Skip to content

Instantly share code, notes, and snippets.

View yetithefoot's full-sized avatar
:octocat:
Loading status...

Vlad Tsepelev yetithefoot

:octocat:
Loading status...
View GitHub Profile
@masatomo
masatomo / gist:983a84bad9671dc29213
Last active February 28, 2018 08:49
How to use MongoDB 2.6.x on CircleCI (circle.yml)
dependencies:
cache_directories:
- mongodb-linux-x86_64-2.6.4
pre:
- if [[ ! -d mongodb-linux-x86_64-2.6.4 ]]; then wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz && tar xvzf mongodb-linux-x86_64-2.6.4.tgz; fi
- sudo /etc/init.d/mongodb stop
- sudo cp mongodb-linux-x86_64-2.6.4/bin/* /usr/bin
- sudo /etc/init.d/mongodb start
var skills = data.skills,
activities = data.activities,
works = data.works,
schools = data.schools;
delete data.schools;
delete data.works;
delete data.activities;
delete data.skills;
@jdx
jdx / boot.js
Last active March 16, 2023 18:08
zero-downtime node.js app runner
// This script will boot app.js with the number of workers
// specified in WORKER_COUNT.
//
// The master will respond to SIGHUP, which will trigger
// restarting all the workers and reloading the app.
var cluster = require('cluster');
var workerCount = process.env.WORKER_COUNT || 2;
// Defines what each worker needs to run
@benbai123
benbai123 / Invalid Byte String
Last active August 29, 2015 14:01
Google Directory User Photo
iVBORw0KGgoAAAANSUhEUgAAAjEAAAH8CAIAAACvk2lUAAAVvUlEQVR42u3dv28UVwLA8ftDruOq
UJHOHVVShQoqUh0VriwaRIFEgUSBKJAokFJEoqBAoojSIBrLDaJBNIgmSmVXls5kjb1e7Nh3L1n8
mFsv9v6Y2Xnvzecj63S6HwTPvnnfmdmZN//4LwCk4R82AQCaBACaBIAmAYAmAaBJAKBJAGgSAGgS
AJoEAJoEgCYBgCYBoEkAoEkAaBIAaBIAmgQAmgQAmgSAJgGAJgGgSQCgSQBoEgBoEgCaBACaBIAm
AYAmAaBJAKBJAGgSAGgSAJoEAJoEgCYBgCYBgCYBoEkAoEkAaBIAaBIAmgQAmgSAJgGAJgGgSQCg
SQBoEgBoEgCaBACaBIAmAYAmAaBJAKBJAKBJAGgSAGgSAJoEAJoEgCYBgCYBoEkAoEkAaBIAaBIA
mgQAmgSAJgGAJgGgSR23v7r2Yenif/75r/Cvg2fPbRAATWrNhwtLIUjDn61z520QAE1qTQxS+Nm9
ddsGAdCk9ptkUwBoUpv2X70eBunD0kVbA0CT2rR76/awSf17920NAE1qU7zB4eDNW1sDQJPa5Msk
AE3SJAA0SZMANClBh5ubmgSgSUnYvXN3GKTe9z/YGgCa1KZ4092nFy9tDQBNapMLdwCapEkAaJIm
AWiSJgGgSZoEoEmaBIAmaRKAJmkSAJqkSUDd9lfXtq9cHTx7blNokiYBLRuu87J17rxNoUmaBJgf
@bregenspan
bregenspan / circle.yml
Created May 8, 2014 22:23
Testing a Circle CI build with Sauce Labs
## Customize the test machine
machine:
environment:
SAUCEUSER: [USERNAME HERE]
SAUCEKEY: [KEY HERE]
dependencies:
post:
- wget https://d2nkw87yt5k0to.cloudfront.net/downloads/sc-latest-linux.tar.gz && tar -xvf sc-latest-linux.tar.gz
@andyshora
andyshora / sublime-merge-tool.sh
Created April 9, 2014 13:39
Set Sublime Text 2 as the default Git merge tool to resolve conflicts
ln -s "/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
git config --global mergetool.sublime.cmd "sublime -w \$MERGED"
git config --global mergetool.sublime.trustExitCode false
git config --global merge.tool sublime
@yetithefoot
yetithefoot / parsecom2csv
Created December 26, 2013 14:31
Retrieves Parse.com object, filter it and converts to CSV(without header)
# converts Parse.com json object presentation to CSV with simple filtering
# dependency - jq command line tool
# NOTE: Parse.com API does not allow to get more than 1000 records per request, so you need to vary skip and limit params
# https://www.parse.com/docs/rest#general-quick
# NOTE: Also you can download exported Parse.com backup (Parse.com\Settings\Export) and read via "cat filename | jq '.'".
echo `curl -H 'X-Parse-Application-Id: <PASTE_YOUR_APP_ID_HERE>' -H 'X-Parse-REST-API-Key: <PASTE_YOUR_REST_API_KEY_HERE>' -H 'Content-Type: application/json' -L https://api.parse.com/1/classes/Email\?skip=0\&limit=1000 -s` | jq '.results[] | .email +","+.type +","+ .createdAt'
@yetithefoot
yetithefoot / ip-geolocate
Created December 19, 2013 00:08
IP Geolocation shell script
# Uses curl for getting location object from telize.com
# Next it uses jq (http://stedolan.github.io/jq/) json parser to extract city and country name
# get current location name based on request IP
curl -s http://www.telize.com/geoip | jq '.city +", "+ .country'
# get location name based on parameter value from request
curl -s http://www.telize.com/geoip/8.8.8.8 | jq '.city +", "+ .country'
@yetithefoot
yetithefoot / stuns
Last active April 2, 2024 10:49 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@plentz
plentz / nginx.conf
Last active June 2, 2024 15:03
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048