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
lockdown: | |
- change passwords for all shell accounts and come up with policy | |
- remove ssh authorized_keys | |
- change mysql root password | |
- grep for any | |
- restart mysql with query logging -> mysql --log=/var/log/mysql | |
- change mysql passwords | |
- |
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
# This is a method I use when working with slow ruby scripts that | |
# operate on huge datasets. | |
# | |
# It caches the return value of a block of extremely slow code | |
# in a file so that subsequent runs are fast. | |
# | |
# It's indispensable to me when doing edit-debug-edit-debug-edit | |
# cycles on giant datasets. | |
# loads ruby object from a cache file or (if cache file doesn't exist) runs |
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
#!/usr/bin/env ruby | |
class Array | |
def random; self[rand(self.length)]; end | |
end | |
# extended by actual player classes | |
class Player | |
attr_reader :name | |
def initialize(name) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char **argv) { | |
char server[20] = "wwwsearch.bing.com"; | |
int result_count; | |
char query[20]; | |
char command[100]; | |
char buffer[10000]; |
NewerOlder