Skip to content

Instantly share code, notes, and snippets.

View saltukalakus's full-sized avatar
💭

Saltuk Alakus saltukalakus

💭
View GitHub Profile
@saltukalakus
saltukalakus / bind.js
Last active August 14, 2016 21:03
js bind
var person = {
name: "James Smith",
hello: function(thing) {
console.log(this.name + " says hello " + thing);
}
}
var helloFunc = person.hello.bind(person);
helloFunc("world"); // output: "James Smith says hello world"
@saltukalakus
saltukalakus / call.js
Created August 14, 2016 21:04
js call
var person = {
name: "James Smith",
hello: function(thing) {
console.log(this.name + " says hello " + thing);
}
}
person.hello.call(person, "world"); // output: "James Smith says hello world"
@saltukalakus
saltukalakus / get_quertdtring_value.js
Created October 23, 2016 18:12
Helper to get a querystring value.
/*
* Helper to get a querystring value.
*/
function getParameterByName( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
@saltukalakus
saltukalakus / get_quertdtring_value.js
Created October 23, 2016 18:12
Helper to get a querystring value.
/*
* Helper to get a querystring value.
*/
function getParameterByName( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
@saltukalakus
saltukalakus / delete_all_tweets.py
Created January 15, 2017 01:22 — forked from vik-y/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script is forked originally from Dave Jeffery. The original implementation
was very slow and deleted around 2 tweets per second. Making it multithreaded I
am able to delete 30-50 tweets per second.
@author: vik-y
----------------------------------------------------------------------------
This script will delete all of the tweets in the specified account.
@saltukalakus
saltukalakus / unfollow.py
Created January 15, 2017 01:23 — forked from perpetual-hydrofoil/unfollow.py
Twitter Unfollow Example (python)
#! /usr/bin/env python
# how to unfollow everyone who isn't following you
# By Jamieson Becker (Public Domain/no copyright, do what you will)
# Easy instructions, even if you don't know Python
#
# 1. Install pip (apt-get install python-pip) and then
# pip install tweepy, which is the python twitter client
#
function (user, context, callback) {
var userApiUrl = auth0.baseUrl + '/users';
function isSocial() {
return user.identities[0].isSocial;
}
function deleteSocialUser(user) {
if (isSocial()){
@saltukalakus
saltukalakus / README.md
Last active February 6, 2017 20:03
Technologies in the scope

List of things I am interested in web technologies. Not inclusive.

Database

  • MongoDB
  • ElasticSearch
  • Redis

Backend Libraries

  • ExpressJs
  • Mongoose
@saltukalakus
saltukalakus / gist:a11ef96fbad46c46516dc2ddf1d42da5
Created March 24, 2017 00:18 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@saltukalakus
saltukalakus / gist:1b3c4815a1bad7da51b98a38446dbab6
Created March 24, 2017 00:18 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0