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
#!/bin/bash | |
INTERFACE="en0" | |
MACCMD="ifconfig $INTERFACE ether" | |
MACREAL="aa:aa:aa:aa:aa:aa" | |
MACFAKE="bb:bb:bb:bb:bb:bb" | |
function usage { | |
echo "Usage:" | |
echo " mac fake" |
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
search("users", "*:*").each do |user_data| | |
user user_data['id'] do | |
comment user_data['comment'] | |
uid user_data['uid'] | |
gid user_data['gid'] | |
home user_data['home'] | |
shell user_data['shell'] | |
end | |
end |
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
2015/08/17 01:55:16 http: panic serving 10.68.10.81:64815: runtime error: invalid memory address or nil pointer dereference | |
goroutine 26 [running]: | |
net/http.func·011() | |
/usr/local/go/src/pkg/net/http/server.go:1100 +0xb7 | |
runtime.panic(0xb3b7a0, 0x11ae913) | |
/usr/local/go/src/pkg/runtime/panic.c:248 +0x18d | |
github.com/drone/drone/plugin/remote/github.DeleteKey(0xc2080457c0, 0xc20816cb78, 0x4, 0xc20816cb90, 0x7, 0xc208172460, 0x1b, 0xc2080aa780, 0x17d, 0x0, ...) | |
/var/cache/drone/src/github.com/drone/drone/plugin/remote/github/helper.go:250 +0xfe | |
github.com/drone/drone/plugin/remote/github.(*GitHub).Deactivate(0xc2080265b0, 0xc208042c60, 0xc208056e00, 0xc208160310, 0x64, 0x0, 0x0) | |
/var/cache/drone/src/github.com/drone/drone/plugin/remote/github/github.go:207 +0x164 |
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
protected void PlaneSplit1() { | |
Mesh mesh = this.GetMesh(); | |
Vector3[] vertices = mesh.vertices; | |
for (int pass = 0; pass < this.Passes; pass++) { | |
// Pick a random point in the Sphere | |
Vector3 splitVector = Random.insideUnitSphere; | |
for (int i = 0; i < mesh.vertices.Length; i++) { | |
// Get the DOT product of that random point |
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 | |
class A { | |
private static $__value = 'Foo'; | |
public function getValue() { | |
return self::$__value; | |
} | |
} | |
class B { |
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 | |
$string = uniqid(); | |
$start = microtime(true); | |
for ($i = 0; $i < 1000000; $i++) { | |
crc32($string); | |
} | |
$elapsed = microtime(true) - $start; | |
echo "crc32 => $elapsed\n"; |
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 | |
/** | |
* Configuration options | |
* | |
*/ | |
$iterations = 10000000; | |
info(); | |
/** | |
* Actual Benchmarks to run |
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
#!/opt/local/bin/php | |
<?php | |
// Get a git log | |
$log = trim(`git shortlog -s -n -e`); | |
$log = explode("\n", $log); | |
// Clean and make a new directory for images. | |
`rm -rf gource-gravatars`; | |
mkdir('gource-gravatars'); |
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
// --- Controller | |
class TestsController extends Controller { | |
public $uses = array(); | |
public function add() { | |
$x = new App(); | |
$x->__cache = 1; |
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/php | |
<?php | |
if ($argc <= 1) { | |
$account = 'CakeDC'; | |
} else { | |
$account = $argv[1]; | |
} | |
if ($argc <= 2) { |
OlderNewer