Skip to content

Instantly share code, notes, and snippets.

View interisti's full-sized avatar
🏠
Working from home

Nikoloz Nikabadze interisti

🏠
Working from home
View GitHub Profile
@axtgr
axtgr / package.json
Created July 24, 2015 15:52
Post install script for creating a symlink in node_modules
"scripts": {
"postinstall" : "node -e \" try { require('fs').symlinkSync('../app', 'node_modules/~', 'dir') } catch(e) { if (e.code !== 'EEXIST') { console.log('Couldn\\'t create a symlink in node_modules:'); console.log(e.message); } } \""
}
@bekatom
bekatom / www_node.js
Created May 6, 2015 20:53
https_config_express_js
#!/usr/bin/env node
var debug = require('debug')('invoice');
var app = require('../app');
var path = require('path');
var fs = require('fs');
var https = require('https');
var http = require('http');
var key = fs.readFileSync('/etc/ssl/private/server.key');
@swenzel
swenzel / wordGen.js
Created February 11, 2015 16:12
JavaScript random word generator
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Version 2, December 2004
//
// Copyright (C) 2015 Swen Wenzel <[email protected]>
//
// Everyone is permitted to copy and distribute verbatim or modified
// copies of this license document, and changing it is allowed as long
// as the name is changed.
//
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@martintreurnicht
martintreurnicht / ColorUtil
Created November 28, 2014 14:47
Lighten and darken colors in android
public static int lighten(int color, double fraction) {
int red = Color.red(color);
int green = Color.green(color);
int blue = Color.blue(color);
red = lightenColor(red, fraction);
green = lightenColor(green, fraction);
blue = lightenColor(blue, fraction);
int alpha = Color.alpha(color);
return Color.argb(alpha, red, green, blue);
}
@tgrall
tgrall / sec_tutorial.md
Last active September 4, 2020 07:27
MongoDB Security Tutorial

#Simple MongoDB Security Tutorial

###1 - Start mongod without any "security option"

$ mongod --port 27017

@clineamb
clineamb / app.js
Last active June 6, 2018 01:53
[DEPRECIATED] Nunjucks 1.0.7 + Express 4.9.2
/*
* Nunjucks + Express
* I couldn't find anything that helped me setup the enviornment
* correctly for these in the latest vesion of Express 4 (at the time
* of writing this).
*
* This Gist for those that want to keep using Nunjucks with Express 4.
* This also goes over working with a Nunjucks environment to use custom
* filters, extensions, etc.
*
@staltz
staltz / introrx.md
Last active May 24, 2025 19:53
The introduction to Reactive Programming you've been missing
@mitchwongho
mitchwongho / Docker
Last active April 16, 2025 07:28
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@roundand
roundand / OpenWithSublimeText3.bat
Last active January 30, 2025 13:12 — forked from mrchief/LICENSE.md
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f