Skip to content

Instantly share code, notes, and snippets.

View danielsamuels's full-sized avatar

Daniel Finch danielsamuels

View GitHub Profile
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Firefox()
driver.get('http://google.com')
# Log in to the developer console.
driver.find_element_by_id('Email').send_keys(args.google_email)
driver.find_element_by_id('Passwd').send_keys(args.google_password)
driver.find_element_by_id('Passwd').send_keys(Keys.RETURN)

Keybase proof

I hereby claim:

  • I am danielsamuels on github.
  • I am danielsamuels (https://keybase.io/danielsamuels) on keybase.
  • I have a public key whose fingerprint is 2700 9969 F582 FA53 F8A3 23BA 1EAA C8F6 CB49 972A

To claim this, I am signing this object:

import glob2
import re
import os
if 'NO NAME' not in os.listdir('/Volumes/'):
print "SD card not found."
exit()
if 'CARDV' not in os.listdir('/Volumes/NO NAME'):
print 'CARDV folder not found.'
Hi, cool project, hope I can be of help. The layout of the network data is designed for minimal data, not for user-friendly parsing so I don't envy you trying to get useful data out of it.
The first part of the file is MetaData, which includes a CRC check, some version information, and information about the replay that we use to show in the list of replays. You seem to have that part all figured out so I'll move on to the fun stuff.
The remainder of the file is stuff serialized in this order:
- Array of strings for all of the levels that need to be loaded (array length followed by each string)
- Array of Keyframe information used for timeline scrubbing (array length followed by each keyframe struct) (Time, Frame, File Position)
- Array of bytes that is the bulk of the data. This is the raw network stream. (array length followed by a bunch of bytes)
- Array of debugging logs (strings). This reminds me that I should probably turn these off to make the replays smaller. (array length followed by each string)
-
:tada::tom::tada::tom::tada::tom::tada::tom::tada::tom::tada::tom::tada::tom:
:tom: H A P P Y B I R T H D A Y :tada:
:tada: T O M :tom:
:tom::tada::tom::tada::tom::tada::tom::tada::tom::tada::tom::tada::tom::tada:
$('th.orderable').on('click', function() {
{% if not filter.form.order.value %}
if (window.location.search.length > 0) {
window.location = window.location.href + '&{{ filter.order_by_field }}=-' + $(this).data('order-key');
} else {
window.location = window.location.href + '?{{ filter.order_by_field }}=-' + $(this).data('order-key');
}
{% else %}
if ('-' + $(this).data('order-key') === '{{ filter.form.order.value }}') {
// We're currently ordered by this key descending.
We can't make this file beautiful and searchable because it's too large.
"steam_id","username"
"76561198074407663","؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁؁"
"76561198028575178","ᴋ̲̲ᴇ̲̲ᴛ̲̲ᴀ̲̲ᴍ̲̲ɪ̲̲ɴ̲̲ᴇ̲̲☭"
"76561198109275098","ТронешьБратаЛяжешьСпать"
"76561198094096333","СлавяИзБесконечногоЛета"
"76561198051716922","ผมนี่อย่างโหดเลยไอสัด"
"76561198136119864","████████████████████"
"76561198110583646","ขายไอดีนี้สนใจทักแชท"
"76561198068261898","ขอบคุณที่ให้โอกาศหนู"
"76561198088711458","███████████████████"
from django.conf import settings as django_settings
from django.core.management.base import BaseCommand
from fabric.api import *
from fabvenv import virtualenv
from _core import load_config
import datetime
import json
import requests
@danielsamuels
danielsamuels / README.md
Last active February 8, 2016 20:19
Providing remote access to a PostgreSQL database

Providing remote access to a PostgreSQL database.

sudo su - postgres
createuser remote -PS
psql

postgres=# \c database_name
postgres=# GRANT SELECT ON ALL TABLES IN SCHEMA public TO remote_user;
postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO remote_user;
@danielsamuels
danielsamuels / blog.md
Last active December 2, 2015 11:04
30 days with PyCharm

30 days with PyCharm

Bugs?

  • Updating from 3.x corrupted the .app
  • Javascript comments, no space after //.
  • Comments (all languages), moves cursor down.
  • Python imports aren't relative, they're full dotted paths.
  • Projects open with no sidebar.
  • Python if statements with brackets fucks up the indentation.