Skip to content

Instantly share code, notes, and snippets.

View theneosloth's full-sized avatar

Stefan Kuznetsov theneosloth

View GitHub Profile
@theneosloth
theneosloth / zombie.cfg
Last active August 29, 2015 13:56
Counter Strike:Global Offensive Zombie Bot Config
//To run open a deathmatch server and run this script. Other modes work too but they sometime require a changelevel
game_type 3 // Setting the game to deathmatch (might need a changelevel if the server was running a non-dm mode)
game_mode 2
//mp_damage_scale_ct_body 0.25 //Couldnt get these settings to work
//mp_damage_scale_ct_head 2 //(Got them from the official valve wiki)
mp_teamname_1 "Zombies"
@theneosloth
theneosloth / TextReader.py
Created February 24, 2013 02:30
Text file reader
import sys,time,os
try:
file = open(sys.argv[1])
except IndexError:
print "Error: please provide a file"
raw_input( "Press any key to exit")
print "Opened {0}".format(sys.argv[1])
lines = ""
@theneosloth
theneosloth / randomChoice.js
Last active December 13, 2015 22:19
Random choice from an array in javascript
function randomChoice(array)
{
var random = Math.random();
random *= array.length;
random = Math.floor(random);
return array[random]
}
@theneosloth
theneosloth / tf2gen.py
Created January 3, 2013 02:19
Tf2 random item generator
import random
weapon_nouns = ["Bat","Bottle","Fists","Launcher","Knife","Axe","SMG","Kukri","Syringe Gun","Flame Thrower","Sticky Launcher","Huntsman","Saw","Shotgun","Revolver"]
weapon_adjectives = ["Pain","Direct","Charging","Power","Eternal","Black","Crusader's","Back","Steel","Volcano","Persian","Family","Disciplinary","Atomic"]
hat_nouns = ["Hat","Cap","Helmet","Beanie","Fedora","Beard","Earbuds","Bucket","Mask","Head","Gasmask"]
hat_adjectives = ["Fancy","Mining","Football","Towering","Expensive","Detective","Splendid","Last"]
class Item:
def __init__(self):
@theneosloth
theneosloth / ticker.py
Last active December 10, 2015 12:19
Facepunch Ticker Checker (Unfinished)
import urllib2,json,time,urllib2,getpass,hashlib,sys
from datetime import datetime
try:
f = open ("date.txt", "r")
date = json.load(f)
print "Date loaded is " +str(datetime.utcfromtimestamp(1356645899))
f.close()
except IOError:
print "File not found"