Skip to content

Instantly share code, notes, and snippets.

@Giwan
Giwan / elementary_os_postinstall_readme.md
Last active March 13, 2026 16:37
Elementary OS 2015 MacBook Pro

Post installation

# latest packages
sudo apt update

Mac Mimic

Keyboard MacOS shortcuts

@Giwan
Giwan / README.md
Last active February 23, 2026 20:24
Fedora 43 on Macbook Pro 2015 Palm rejection issue
@Giwan
Giwan / vscode.md
Created March 31, 2025 08:12
Add current file path in terminal (Keyboard shortcut for VSCode)

Add the current open file into the terminal.

 {
    "key": "cmd+shift+t",
    "command": "workbench.action.terminal.sendSequence",
    "args": { "text": "${relativeFile}" },
    "when": "terminalFocus"
  }
@Giwan
Giwan / disable-esc-button-exit-fullscreen-on-firefox.md
Created October 9, 2023 20:12
How to disable exit Firefox full screen with escape button
  1. Go to about:config in firefox
  2. Note that you will need to accept the risk warning so abort if you're not comfortable[1]
  3. In the filter input field type "fullscreen"
  4. You should have the option of browser.fullscreen.exit_on_escape
  5. Make sure it's set to false.

[1] This particular change is not very risky however there are other settings that can be changed here that are not so innocent. Make sure that you're careful in this environment and don't just apply anything you read on the internet.

Stop a running docker container with a name tag

docker stop $(docker ps -q -a --filter ancestor=<tag_name> --filter status=running)
@Giwan
Giwan / cpu-temp.md
Created August 4, 2022 07:50
Check CPU temp on Intel mac

CPU Tempurature

This will show the CPU temperature on an intel mac. sudo powermetrics --samplers smc |grep -i "CPU die temperature"

The terminal window will keep reporting the temperature. Note that you'll need sudo priveliges to run this.

Source: https://beebom.com/how-check-cpu-temperature-mac/

@Giwan
Giwan / car-brands.json
Last active July 20, 2022 18:57
list of car brands and models
[
{
"id": 1,
"name": "brand1"
},
{
"id": 2,
"name": "brand2"
}
]
@Giwan
Giwan / copy-indexhtml-with-meta.sh
Last active July 13, 2022 12:42
AWS command in GitHub Workflow to copy the index.html file and add cache-header
#!/bin/bash
if [[ "$1" != "" ]]; then
BUCKETNAME="$1"
else
echo ERROR: A bucket name is required to proceed.
exit 1
fi
# copy from the same bucket and update the meta data.
{
"basics": {
"name": "Giwan Persaud",
"label": "Programmer",
"picture": "",
"email": "john@gmail.com",
"phone": "0600000000",
"website": "https://mytoori.com",
"summary": "A summary about me",
"location": {
@Giwan
Giwan / git.md
Created April 7, 2020 10:03
Git stuff

copy file from other branch

  1. git checkout targetBranch
  2. git checkout sourceBranch filename.txt

File "filename.txt" is now available in the source branch.