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
GetUtcOffSet - JsonConvert.cs Line 111 | |
private static TimeSpan GetUtcOffset(DateTime dateTime) | |
{ | |
#if SILVERLIGHT | |
return TimeZoneInfo.Local.GetUtcOffset(dateTime); | |
#else | |
return TimeZone.CurrentTimeZone.GetUtcOffset(dateTime); | |
#endif | |
} |
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
local mod = 2^32 | |
local modm = mod-1 | |
local function memoize(f) | |
local mt = {} | |
local t = setmetatable({}, mt) | |
function mt:__index(k) | |
local v = f(k) | |
t[k] = v | |
return v |
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
local function base64(data) | |
-- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss <[email protected]> | |
-- Licensed under the terms of the LGPL2 | |
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
return ((data:gsub('.', function(x) | |
local r, b = '', x:byte() | |
for i = 8, 1, -1 do r = r .. (b % 2 ^ i - b % 2 ^ (i - 1) > 0 and '1' or '0') end | |
return r; | |
end) .. '0000'):gsub('%d%d%d?%d?%d?%d?', function(x) |
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
reg add HKCU\Environment /v SERVERS /t REG_EXPAND_SZ /d "D:\Servers" /f |
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
{ | |
"Settings": { | |
"ChatName": "FOO", | |
"ChatCommand": "bar", | |
"DoSomething": "false", | |
"ThisNumber": 50 | |
}, | |
"Messages": { | |
"HelloWorld": "This is a message" | |
} |
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
<?php | |
// Set the content-type | |
header ("Content-type: image/jpeg"); | |
// Get text from URL | |
$text = $_GET['text']; | |
// Create some colors | |
$white = imagecolorallocate($im, 255, 255, 255); |
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
use strict; | |
use Win32::TieRegistry ( Delimiter=>"/", ArrayValues=>1 ); | |
&setProxy(); | |
############### | |
sub setProxy{ | |
#Set access to use proxy server (IE) | |
#http://nscsysop.hypermart.net/setproxy.html | |
my $server=shift || "localhost"; | |
my $port=shift || 8080; | |
my $enable=shift || 1; |
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
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | |
echo -e "Changing directory to $HOME and configuring git" | |
cd $HOME | |
git config --global user.email "[email protected]" | |
git config --global user.name "Travis" | |
echo -e "Cloning gh-pages repo using token" | |
git clone --quiet --branch=gh-pages https://[email protected]/$TRAVIS_REPO_SLUG.git gh-pages > /dev/null | |
echo -e "Copy apidocs to gh-pages repo root" |
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
<?php | |
function do_wed() { | |
if ($objections != true) { | |
function do_vow() { | |
$vow = 1; | |
do { | |
if ($richer === 1 | |
&& $poorer === 1 | |
&& $sickness === 1 | |
&& $health === 1) { |
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/sh | |
BACKUP_PATH=/home/USERNAME/backups/servers | |
SERVERS_HOME=/home/USERNAME/servers | |
mkdir -vp $BACKUP_PATH/game/minecraft/`date '+%Y%m%d'` | |
tar czvf $BACKUP_PATH/game/minecraft/demo/`date '+%Y%m%d'`.tgz $SERVERS_HOME/game/minecraft/demo | |
tar czvf $BACKUP_PATH/game/minecraft/dev/`date '+%Y%m%d'`.tgz $SERVERS_HOME/game/minecraft/dev | |
#mkdir -vp $BACKUP_PATH/voice/mumble |
NewerOlder