Skip to content

Instantly share code, notes, and snippets.

@gaza3g
gaza3g / spacefinder.js
Created July 10, 2020 10:48
Some script
<script type="javascript">
fetch("https://api-ourmosques.commonspaces.sg/api_ext/remote_frontend_mosque_retrievebyclusterid.aspx", {
"headers": {
"accept": "application/json, text/plain, */*",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site"
},
@gaza3g
gaza3g / mac-setup.md
Last active November 22, 2018 07:45 — forked from orlando/mac-setup.md
Fresh Mac OS Setup

1. Run Software Update

Make sure everything is up to date in the App Store

2. Install Homebrew and Homebrew-Cask

  1. Open a terminal window and execute the Homebrew install script:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@gaza3g
gaza3g / hack.sh
Last active April 29, 2018 02:28 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
echo "Always show scrollbars"
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
echo "Show all filename extensions in Finder"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
echo "Remove slow animations when holding shift"
defaults write NSGlobalDomain FXEnableSlowAnimation -bool false
@gaza3g
gaza3g / ssh-retry.sh
Created March 10, 2016 09:08 — forked from 9point6/ssh-retry.sh
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/usr/bin/env bash
# Check we've got command line arguments
if [ -z "$*" ] ; then
echo "Need to specify ssh options"
exit 1
fi
# Start trying and retrying
((count = 100))
@gaza3g
gaza3g / postgres.conf
Last active September 16, 2015 06:18
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
#!/bin/sh
#install xcode from appstore
# bash <(curl -s https://gist.githubusercontent.com/gaza3g/a7383155a830c0a115e3/raw/ae25bf22381e217b6f7a0df72a6283a937f55636/media_install.sh)
echo Install XCode cmd tools
xcode-select --install
echo Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Tmux settings
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l bash"
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set-option -g default-terminal "screen-256color"
@gaza3g
gaza3g / osx_install.sh
Last active September 2, 2017 05:42 — forked from t-io/osx_install.sh
#!/bin/sh
#install xcode from appstore
# bash <(curl -s https://gist.githubusercontent.com/gaza3g/b606ca427911147946e9/raw/a6e457fb194a6cbc278760b05e6c08fed85c32e1/osx_install.sh)
echo Install XCode cmd tools
xcode-select --install
echo Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@gaza3g
gaza3g / yosemite-clean-setup.sh
Last active August 29, 2015 14:07
My Yosemite post-install automated settings script
###############################################################################
# Override system defaults #
###############################################################################
echo "Turn off the character accent selector and re-enable key repetition"
defaults write -g ApplePressAndHoldEnabled -bool false
echo "Case-insensitive tab completion in terminal"
echo "set completion-ignore-case On" >> ~/.inputrc
@gaza3g
gaza3g / gist:4015718
Created November 5, 2012 07:00
spotify in Messages.app status
#taken from user "pinyourwings22"
#at http://forums.macrumors.com/showthread.php?t=1418925
on idle
tell application "Spotify"
set theTrack to current track
set theArtist to artist of theTrack
set theName to name of theTrack
if player state is playing then
set playStatus to "playing"