This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=node.js application - %I | |
| After=network.target | |
| # fail if service is started 3 times within 5 minutes | |
| StartLimitIntervalSec=300 | |
| StartLimitBurst=3 | |
| [Service] | |
| User=daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redis = require 'redis' | |
| client = redis.createClient | |
| HOST: process.env.HOST | |
| client.on 'error', (err) -> console.error err | |
| client.on 'subscribe', (channel, count) -> | |
| console.log "Subscribed:", channel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| connect-otw () { | |
| name=$(basename $PWD) | |
| num="$1"; | |
| shift; | |
| ( test -n "$name" || exit 3; test -f "$name$num" || exit 4; | |
| sshpass -f "$name$num" ssh -q $name$num@$name.labs.overthewire.org $@ ) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Position=1, Mandatory=$True)] | |
| [string]$dataFile1, | |
| [Parameter(Position=2, Mandatory=$True)] | |
| [string]$dataFile2 | |
| ) | |
| $dataObj1 = cat -raw "$dataFile1.json" | ConvertFrom-Json | |
| $dataObj2 = cat -raw "$dataFile2.json" | ConvertFrom-Json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fs = require 'fs' | |
| fatReader = require './fatReader' | |
| fd = fs.openSync 'fatFilesystem.fat', 'r' | |
| fat = fatReader.getFS(fd) | |
| fatReader.log fat | |
| console.log "\nReading root directory" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$outputFile | |
| ) | |
| $data = @{} | |
| function header($text) { | |
| "`n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| if(typeof jQuery!='undefined') { | |
| return console.log('jQuery already present: v'+jQuery.fn.jquery); | |
| } | |
| if(typeof($) === 'function') { | |
| console.log('$ already defined. Use $jq(), not $().'); | |
| } | |
| var script=document.createElement('script'); | |
| script.src='http://code.jquery.com/jquery-latest.min.js'; | |
| var head=document.getElementsByTagName('head')[0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cluster = require 'cluster' | |
| if not cluster.isMaster then return require 'webapp2' | |
| PORT = process.env.PORT or 8000 | |
| process.env.PORT = 0 | |
| httpProxy = require 'http-proxy' | |
| util = require 'util' | |
| express = require 'express' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cluster = require 'cluster' | |
| if not cluster.isMaster then return require './app' | |
| util = require 'util' | |
| express = require 'express' | |
| gitpull = require 'gitpull' | |
| gitsha = require 'gitsha' | |
| require 'colors' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("a[href^='http']").each(function() { | |
| $(this).css({ | |
| background: "url(http://www.google.com/s2/u/0/favicons?domain=" + this.hostname + | |
| ") left center no-repeat", | |
| "padding-left": "20px" | |
| }); | |
| }); |