This file contains 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
name := "MyApp" | |
version := "1.0" | |
scalaVersion := "2.10.4" | |
libraryDependencies ++= Seq( | |
// Use Log4J 1.2.17 instead of the unresolvable jmx of 1.2.15 | |
"log4j" % "log4j" % "1.2.17", | |
// Spark components - some provided on the cluster |
This file contains 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
public class BackgroundService : IRegisteredObject | |
{ | |
public static void Start(Action action, TimeSpan interval) | |
{ | |
var backgroundService = new BackgroundService(interval, action); | |
HostingEnvironment.RegisterObject(backgroundService); | |
} | |
private Timer timer; |
This file contains 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
<?php | |
// Put this in your themes functions.php to remove WordPress noise | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'index_rel_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0); | |
remove_action('wp_print_styles', 'print_emoji_styles'); |
This file contains 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
$sourcePattern = "http://something.com/somepath/somefile*.jpg" | |
$targetDir = "c:\downloads" | |
$count = 256 | |
New-Item -Path $targetDir -ItemType Directory -Force | |
for ($i=1; $i -le $count; $i++) { | |
$source = $sourcePattern.Replace("*", $i) | |
$parts = $source.Split('/') | |
$target = Join-Path $targetDir $parts[$parts.Length - 1] | |
echo "Downloading $source to $target" |
This file contains 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
http = require('http') | |
module.exports = (grunt) -> | |
grunt.registerTask 'local-crash-reporter', 'Start a local crash reporter server.', -> | |
PORT = 1127 | |
done = this.async() | |
server = http.createServer (request, response) -> | |
if request.method is 'POST' | |
body = [] |
This file contains 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
@echo off | |
:WARMUP | |
set DTC_GameTitle=none | |
set DTC_NumberOfDisks=1 | |
set DTC_Publisher=none | |
set DTC_ReleaseType=none | |
set DTC_Year=none | |
set DTC_Platform=none | |
set DTC_RecommendedModel=none |
This file contains 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
#!/usr/bin/env node | |
const fs = require('fs') | |
const path = require('path') | |
const process = require('process') | |
var rootPath | |
if (process.argv.length > 2) { | |
rootPath = process.argv[2] | |
} else { |
This file contains 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
[ | |
{ | |
"backcolor": "#000000", | |
"name": "Compaq G80-1800", | |
"author": "Damien Guard", | |
"background": { | |
"name": "ABS WFK", | |
"style": "background-image: url('/bg/plastic/abs-wfk.jpg');" | |
}, | |
"switchMount": "cherry", |
This file contains 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
[ | |
{ | |
"name": "Lightsaver G80-1800 style", | |
"author": "Damien Guard", | |
"background": { | |
"name": "Steel brushed dark", | |
"style": "background-image: url('/bg/metal/iron_texture1745.jpg');" | |
}, | |
"switchMount": "cherry", | |
"switchBrand": "cherry", |
This file contains 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
exports.getProxyServers = (callback) => { | |
try { | |
new Registry('\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings') | |
.get('ProxySever', (err, val) => { | |
callback(err, err ? undefined || Object.assign({}, ...val.split(';').map(v => v.split('=')).map(v => ({[v[0]]: v[1]})))) | |
}) | |
} catch (err) { | |
callback(err) | |
} |
OlderNewer