Skip to content

Instantly share code, notes, and snippets.

Working from home

Gokhan Demirhan gokhandemirhan

Working from home
View GitHub Profile
defaults write "Apple Bitpool Max (editable)" 80
defaults write "Apple Bitpool Min (editable)" 48
defaults write "Apple Initial Bitpool (editable)" 40
defaults write "Negotiated Bitpool" 48
defaults write "Negotiated Bitpool Max" 53
defaults write "Negotiated Bitpool Min" 48
defaults write "Stream - Flush Ring on Packet Drop (editable)" 30
defaults write "Stream - Max Outstanding Packets (editable)" 15

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$" "$extension_id%26uc" 
unzip -d "$extension_id-source" "$"

Thx to crxviewer for the magic download URL.

gokhandemirhan / refresh-chrome-change.rb
Last active May 10, 2017
refresh chrome when a file changed in specified directory
View refresh-chrome-change.rb
#!/usr/bin/env ruby
# watch.rb by Brett Terpstra, 2011 <>
# with credit to Carlo Zottmann <>
trap("SIGINT") { exit }
class String
# colorization
def colorize(color_code)
gokhandemirhan / 666_lines_of_XSS_vectors.html
Created Mar 11, 2016 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from
View 666_lines_of_XSS_vectors.html
<img src=1 href=1 onerror="javascript:alert(1)"></img>
View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
gokhandemirhan / singleton.js
Created Feb 16, 2016 — forked from wpsmith/singleton.js
JavaScript: Singleton JS Example
View singleton.js
var Singleton = (function () {
var instance;
function createInstance() {
var object = new Object("I am the instance");
return object;
return {
getInstance: function () {

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
gokhandemirhan / bootstrap-custom.css
Last active Sep 7, 2015 — forked from IAMIronmanSam/bootstrap-custom.css
Custom bootstrap for sharepoint specific
View bootstrap-custom.css
/*bootstrap 3 resets for SharePoint*/
/*border-box causes many issues with SP*/
*, *:before, *:after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
/*reset elements that B3 is expecting to be border-box*/
* [class^="col-"], * [class^="col-"]:before, * [class^="col-"]:after,
.container, .container:before, .container:after,
gokhandemirhan / file-checkedout-REST.js
Last active Sep 7, 2015 — forked from wpsmith/file-checkedout-REST.js
SharePoint JS: SP.File.checkOutType property gets a value that indicates how the file is checked out of a document library.
View file-checkedout-REST.js
//Get file checkout type via REST
$.ajax({url: "/_api/web/getFileByServerRelativeUrl('" + pageUrl + "')/checkOutType",
headers: { "Accept": "application/json; odata=verbose" },
success: function(data) {
if(data.d.CheckOutType == 0) {
console.log('The file is checked out');