Skip to content

Instantly share code, notes, and snippets.

View virenratan's full-sized avatar

Viren virenratan

  • Melbourne, AU
View GitHub Profile
@virenratan
virenratan / slack.sh
Created November 4, 2023 22:47
Slack timezone fix
#!/usr/bin/env bash
codesign -dr - /Applications/Slack.app && TZ=Australia/Melbourne open -b com.tinyspeck.slackmacgap
@virenratan
virenratan / 1-setup.md
Created October 5, 2019 03:17 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@virenratan
virenratan / iterm2-oh-my-fish.md
Created March 23, 2019 22:42 — forked from leymannx/iterm2-oh-my-fish.md
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra
@virenratan
virenratan / homebrew-permissions-issue.md
Created January 26, 2019 02:12 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@virenratan
virenratan / macos-doh-cloudflare.md
Created September 19, 2018 06:55
macOS DoH (DNS over HTTPS) using cloudflare DNS servers
brew install dnscrypt-proxy

Edit /usr/local/etc/dnscrypt-proxy.toml and edit server_names

server_names = ['cloudflare']

Then just start it and ensure it starts on boot

sudo brew services start dnscrypt-proxy
@virenratan
virenratan / gist:5226d6667a37ddefbbe94e1ddfca2b33
Created September 19, 2018 01:01 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@virenratan
virenratan / twitter-cleanup.js
Created July 14, 2018 02:52
Delete twitter content
// delete tweets.
[].slice.call(document.getElementsByClassName('js-actionDelete')).map(tweet => {
tweet.childNodes[1].click()
document.getElementsByClassName('delete-action')[0].click()
})
// un-retweet.
[].slice.call(document.getElementsByClassName('ProfileTweet-actionButtonUndo')).map(retweet => {
retweet.click()
document.getElementsByClassName("js-close")[0].click()
@virenratan
virenratan / install.sh
Created April 30, 2018 06:30 — forked from mshick/install.sh
Installing Node.js with Homebrew and nvm
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install nvm
brew install nvm
# Export nvm environment
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
@virenratan
virenratan / cloudSettings
Last active March 17, 2021 02:53
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-03-17T02:52:54.762Z","extensionVersion":"v3.4.3"}
@virenratan
virenratan / init.coffee
Last active September 19, 2018 04:15
Atom editor config
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->