Skip to content

Instantly share code, notes, and snippets.

@sbolel
sbolel / sinan-bolel.md
Last active October 24, 2020 02:55
Sinan Bolel
@sbolel
sbolel / DCOS-on-Google-Compute-Engine.md
Last active August 6, 2019 02:53
Guide: Set up a DC/OS Mesos cluster on Google Compute Engine

DCOS on Google Compute Engine

Original source: dcos-labs: DCOS on Google Compute Engine

This repository contains scripts to configure a DC/OS cluster on Google Compute Engine.

A bootstrap node is required to run the scripts and to bootstrap the DC/OS cluster.

PLEASE READ THE ENTIRE DOCUMENT. YOU MUST MAKE CHANGES FOR THE SCRIPTS TO WORK IN YOUR GCE ENVIRONMENT.

@sbolel
sbolel / GIF-Screencast-OSX.md
Created February 13, 2017 18:16 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@sbolel
sbolel / aurelia-cli-local-development.md
Last active February 26, 2017 00:06
Local development with aurelia-cli -- demo https://github.com/aurelia/cli/pull/499
29 17:34:33 ~/projects/@aurelia  
$ npm uninstall -g au aurelia-cli && npm cache clear
- aurelia-cli@0.24.0 node_modules/aurelia-cli

32 17:34:42 ~/projects/@aurelia  
$ npm install -g ./cli/
/Users/dev/.nvm/versions/node/v7.5.0/bin/aurelia -> /Users/dev/.nvm/versions/node/v7.5.0/lib/node_modules/aurelia-cli/bin/aurelia-cli.js
/Users/dev/.nvm/versions/node/v7.5.0/bin/au -> /Users/dev/.nvm/versions/node/v7.5.0/lib/node_modules/aurelia-cli/bin/aurelia-cli.js
/Users/dev/.nvm/versions/node/v7.5.0/lib
@sbolel
sbolel / asynchronous-snippet-loading.md
Last active April 29, 2017 04:49
Snippets for Loading Scripts Asynchronously
@sbolel
sbolel / meetup-multi-unsubscribe.js
Last active June 4, 2021 20:33
Meetup: click all unsubscribe buttons
(function() {
document
.querySelectorAll('.pseudocheckbox')
.forEach((node) => {
els[i].click()
})
})()
@sbolel
sbolel / .htaccess
Created May 11, 2017 03:28
Sample .htaccess file
# Browser Cache
# -------------
# Images: 8 days
<filesMatch “.(jpg|jpeg|png|gif|swf|ico)$”>
Header set Cache-Control “max-age=691200, public”
</filesMatch>
# Scripts: 8 days
<filesMatch “.(xml|txt|js)$”>
Header set Cache-Control “max-age=691200, proxy-revalidate”
@sbolel
sbolel / insta-like-feed.js
Created June 17, 2017 02:13
Instagram auto-liker in the browser using Chrome Dev Tools
/**
* @desc Injects jQuery into Instagram feed page and likes X posts at a time
*
* Usage: Open https://www.instagram.com/ in Chrome and login to view your feed;
* run this script in the JS console to like posts in your feed in batches.
*
* @param {number} start - starting post index (should be 0 unless manually continuing a prev. exec.)
* @param {number} count - number of posts to like per batch (like X posts, wait a little, repeat)
* @param {number} interval - number of milliseconds to wait between batches, +/- some randomness
*/
@sbolel
sbolel / git-rewrite-authors
Last active October 24, 2020 02:45
Git: rewrite commit authors
#!/bin/bash
# get the email address to replace
echo " Enter OLD_EMAIL to replace: "
read -r oldEmail
# get the correct authors email to replace with
echo " Enter CORRECT_EMAIL:"
read -r correctEmail
@sbolel
sbolel / pfctl-forward
Last active March 9, 2018 02:37
pfctl hack: forward localhost port to another port
#!/usr/bin/env bash
# forward localhost:8000 to localhost:3000
echo "rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 8000 -> 127.0.0.1 port 3000" | sudo pfctl -ef -
# remove it
sudo pfctl -F all -f /etc/pf.conf