Skip to content

Instantly share code, notes, and snippets.

@monolithed
monolithed / mocha_vs_jasmine.md
Last active January 30, 2021 18:54
Mocha vs. Jasmine

Почему Mocha, а не Jasmine?

Ниже будут приведены аргументы в пользу выбора Mocha

  • Высокая популярность:
    — 4m против 400k загузок в месяц

  • Высокая активность:
    — 1 890 против 1400 коммитов (всего)
    — 171 против 101 коммитов (последний год)

@NateWarner
NateWarner / TCO-Fibonacci.md
Last active August 21, 2018 20:09
Tail Call Optimization for Recursive Fibonacci - JS
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@tcarlsen
tcarlsen / gulpfile.js
Last active July 11, 2016 20:20
My personally gulp file
/*jslint indent:2, node:true, sloppy:true*/
var
gulp = require('gulp'),
coffee = require('gulp-coffee'),
rename = require("gulp-rename"),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
styl = require('gulp-styl'),
concat = require('gulp-concat'),
csso = require('gulp-csso'),
production/
ansible_hosts # inventory file for production servers
group_vars/
group1 # here we assign variables to particular groups for production
group2 # ""
host_vars/
hostname1 # if production systems need specific variables, put them here
hostname2 # ""
files/
@suma
suma / _etc_init.d_autosshd
Last active August 25, 2020 07:38
Autossh init script(Ubuntu) for reverse ssh tunneling
#! /bin/sh
### BEGIN INIT INFO
# Provides: autosshd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: autosshd initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@dr-dimitru
dr-dimitru / Social RESTful URLs snippet.md
Last active January 28, 2023 03:57
Social links, +1s and shares using only HTML (no JS)
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@walterheck
walterheck / Bash MySQL backupo script
Created June 29, 2013 14:01
Backup script for MySQL backups locally, both mysqldumps and binary backupos using percona's xtrabackup
#!/bin/bash
# Configuration
. /etc/mysql/mysql_backup.conf
# Dump the mysql databases to a daily dump file.
function log()
{
logger -i -p daemon.info -t mysqldump "$1"
echo $1 >> $LOGFILE
@taldanzig
taldanzig / osxvpnrouting.markdown
Created January 24, 2013 22:14
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN: