Skip to content

Instantly share code, notes, and snippets.

View gokaygurcan's full-sized avatar
:octocat:
[() => {}]

Gökay Gürcan gokaygurcan

:octocat:
[() => {}]
View GitHub Profile
git rm -r -f --cached $PATH
echo $PATH >> .gitignore
git add .gitignore
git commit --amend --no-edit
git reflog expire --expire=now --all --verbose
git gc --prune=now --aggressive
@gokaygurcan
gokaygurcan / key.md
Created December 14, 2018 12:16
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@gokaygurcan
gokaygurcan / cliloc.js
Last active December 14, 2018 14:58
ultima online
/*
Cliloc (Client Localized) files:
- Cliloc.chs
- Cliloc.cht
- Cliloc.deu
- Cliloc.enu
- Cliloc.esp
- Cliloc.fra
- Cliloc.jpn
@gokaygurcan
gokaygurcan / tiledata.js
Created October 29, 2018 14:58
read tiledata.mul and create m_LandData and m_ItemData lists. yaay.
const { readFileSync } = require('fs');
const { normalize, join } = require('path');
const { hexy } = require('hexy');
const { cwd } = process;
const fileName = 'tiledata.mul';
const tiledata = readFileSync(normalize(join(cwd(), 'muls', fileName)), {
flags: 'r'
sudo openssl dhparam -dsaparam -out /etc/nginx/dhparam.pem 2048
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com
sudo service nginx stop
sudo certbot certonly --standalone -d example.com -d www.example.com --email hello@example.com
0 0 * * * /usr/bin/certbot renew --quiet --renew-hook "/usr/sbin/nginx -s reload"
@gokaygurcan
gokaygurcan / screenshot.js
Created September 18, 2017 15:08
screenshot.js
// screenshot
//
// node screenshot.js https://example.com 1024 768
const puppeteer = require('puppeteer');
const args = process.argv.slice(2);
(async () => {
const browser = await puppeteer.launch();
@gokaygurcan
gokaygurcan / keybase.md
Created August 28, 2016 21:28
Keybase proof

Keybase proof

I hereby claim:

  • I am gokaygurcan on github.
  • I am gokaygurcan (https://keybase.io/gokaygurcan) on keybase.
  • I have a public key whose fingerprint is CC50 57BE 2B49 8DF7 451F 4D18 6F7C 093C 20F3 1655

To claim this, I am signing this object:

@gokaygurcan
gokaygurcan / hash.js
Created March 5, 2016 20:20
Magento-like password hash in Node.js
// core modules
var crypto = require('crypto');
// variables
var password = '12345678';
var salt = (+new Date()).toString(); // something unique, probably.
// hash
var hashedPassword = crypto.createHash('md5').update(crypto.createHash('md5').update(salt + password) + ':' + salt).digest('hex');
@gokaygurcan
gokaygurcan / swap.sh
Created January 26, 2016 12:27
Allocate Swap space on Ubuntu.
#!/bin/sh
# start
echo ""
echo "> swap.sh"
echo ""
# variables
SWAP_SIZE="4G"
if [ ! -z "$2" ]; then
@gokaygurcan
gokaygurcan / sample.css
Created October 11, 2015 18:34
CSS Properties, grouped and ordered.
/**
⋮ CSS Properties, grouped and ordered.
*/
.selector {
/* positioning */
bottom: auto;
clear: none;
clip: auto;