Skip to content

Instantly share code, notes, and snippets.

View sotsugov's full-sized avatar
💭
I may be slow to respond.

Igor sotsugov

💭
I may be slow to respond.
  • London, UK
  • 02:11 (UTC +01:00)
View GitHub Profile
@sotsugov
sotsugov / autoexec.cfg
Last active July 16, 2018 15:04
CS:GO CS 1.6 Configs
rate "999999"
cl_updaterate "128"
cl_cmdrate "128"
cl_interp_ratio "1"
cl_interp "0"
fps_max "999"
volume "0.3"
@sotsugov
sotsugov / Fallout 2
Last active December 31, 2015 05:39
Character Profiles
FALLOUT
VAULT-13 PERSONNEL RECORD
25 July 2241 0824 hours
Name: O Age: 33 Gender: Male
Level: 01 Exp: 0 Next Level: 1,000
::: Statistics :::
Strength: 04 Hit Points: 028/027 Sequence: 04
Perception: 09 Armor Class: 009 Healing Rate: 01
<?xml version="1.0" encoding="ISO-8859-1"?>
<vxml version="2.0" lang="en">
<form>
<block>
<prompt bargein="false">Hello world!
</prompt>
</block>
</form>
</vxml>
@sotsugov
sotsugov / install
Created July 29, 2014 14:23
Mac OS X Mavericks Install
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
@sotsugov
sotsugov / utf8_conv.py
Last active August 29, 2015 14:06
UTF-8 Unicode (with BOM) text to UTF-8
import os, sys, codecs
BUFSIZE = 4096
BOMLEN = len(codecs.BOM_UTF8)
path = sys.argv[1]
with open(path, "r+b") as fp:
chunk = fp.read(BUFSIZE)
if chunk.startswith(codecs.BOM_UTF8):
i = 0

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
[29 Mar 2010: An expanded and annotated version of this is available on my website at http://www.thebraidytester.com/downloads/YouAreNotDoneYet.pdf.]
Accessibility
Check the following MSAA property settings for every control on every dialog, command bar, and other UI feature: NAME, ROLE, STATE, VALUE, KBSHORTCUT, and DEFACTION
Change values in edit boxes and verify those values are reflected in the MSAA property set
Run in high contrast mode
Run in large font mode
Run with Sound Sentry
Run with sticky keys and other mouse key settings
@sotsugov
sotsugov / The Technical Interview Cheat Sheet.md
Last active November 27, 2018 15:38 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.