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 | |
bindir="$(dirname "$(readlink -fm "$0")")" | |
username=[USERNAME] | |
password=[PASSWORD] | |
cd $bindir | |
./cgminer -o stratum+tcp://mint.bitminter.com:3333 -u $username -p $password |
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 | |
# Gets the absolute path of the directory of this bash script. works in Linux & OSX | |
# greets to https://stackoverflow.com/questions/394230/detect-the-os-from-a-bash-script | |
# greets to https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-osx | |
function detectplatform { | |
platform='unknown' | |
unamestr=`uname` | |
if [[ "$unamestr" == 'Linux' ]]; then |
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
apple-dapple:fart chrisgrimmett$ cd ~/scripts/ | |
apple-dapple:scripts chrisgrimmett$ git clone https://github.com/tracebox/tracebox | |
Cloning into 'tracebox'... | |
remote: Counting objects: 1403, done. | |
remote: Compressing objects: 100% (3/3), done. | |
remote: Total 1403 (delta 0), reused 0 (delta 0), pack-reused 1400 | |
Receiving objects: 100% (1403/1403), 279.13 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (860/860), done. | |
Checking connectivity... done. | |
apple-dapple:scripts chrisgrimmett$ cd tracebox/ |
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
// var syntax with initializers. | |
var u uint = 7 // Unsigned, but implementation dependent size as with int. |
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
["127.0.0.1", 8000] | |
self id = 208 |
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
$ python2.7 main.py -D 8000 -remote None | |
None | |
self id = 86 | |
joining | |
joined | |
--- A python written IRC Server project --- | |
-L- Starting server... | |
-E- Server aborted due to an error | |
-E- [CannotListenError]: Couldn't listen on 127.0.0.1:6667: [Errno 98] Address already in use. | |
Exception in thread Thread-2: |
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
root@vultr:~/scripts/ChordRelayChat# python2.7 main.py -D 8000 -remote None | |
None | |
self id = 27 | |
joining | |
joined | |
Exception in thread Thread-2: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner | |
self.run() | |
File "/root/scripts/ChordRelayChat/chord/chord.py", line 61, in run |
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
root@vultr:~/scripts/ChordRelayChat# python2.7 main.py -remote 73.207.38.249:8000 | |
self id = 27 | |
joining | |
poking ["73.207.38.249", 8000] | |
fingering | |
joined | |
Exception in thread Thread-2: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner | |
self.run() |
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
// Go is fully garbage collected. It has pointers but no pointer arithmetic. | |
// You can make a mistake with a nil pointer, but not by incrementing a pointer. | |
func learnMemory() (p, q *int) { | |
// Named return values p and q have type pointer to int. | |
p = new(int) // Built-in function new allocates memory. | |
// The allocated int is initialized to 0, p is no longer nil. | |
s := make([]int, 20) // Allocate 20 ints as a single block of memory. | |
s[3] = 7 // Assign one of them. | |
r := -2 // Declare another local variable. | |
return &s[3], &r // & takes the address of an object. |
OlderNewer