Skip to content

Instantly share code, notes, and snippets.

View TemaSM's full-sized avatar

Tema Smirnov TemaSM

View GitHub Profile
@TemaSM
TemaSM / [WIN] GitKraken Context Menu - Remove.reg
Created April 17, 2017 13:33
Remove GitKraken from Windows Context Menu
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\GitKraken]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\GitKraken\command]
@TemaSM
TemaSM / latest.php
Last active February 13, 2017 05:08
[PHP] Get file by latest version from current directory (electron-builder / nsis-web)
<?
// Author: Tema Smirnov [https://github.com/TemaSM] © 2017
$iVersion= 0;
$filename = "<filename>.ext";
$regexp = "/([-A-z]+)-([\.0-9]+)-([a-z]+)-([a-z0-9]+).+nsis.7z/";
/* Example: MyProject-0.0.1-alpha-x64.nsis.7z
0 => MyProject-0.0.1-alpha-x64.nsis.7z
1 => MyProject
2 => 0.0.1
3 => alpha
@TemaSM
TemaSM / Sails.js Nginx Cluster
Last active August 29, 2015 14:26 — forked from uhho/node nginx configuration
Sample nginx configuration for NodeJS + SocketIO app
# Load balancer configuration
upstream exampleApp {
# Directs to the process with least number of connections.
least_conn;
# One failed response will take a server out of circulation for 20 seconds.
server 127.0.0.1:10080 fail_timeout=20s;
#server 127.0.0.1:10081 fail_timeout=20s;
#server 127.0.0.1:10082 fail_timeout=20s;
#server 127.0.0.1:10083 fail_timeout=20s;