Skip to content

Instantly share code, notes, and snippets.

@Gerst20051
Gerst20051 / cookieclicker.py
Last active January 7, 2016 22:32
Script To Automate Cookie Cutter
import time
from splinter import Browser
from threading import Thread
#
# SETUP INSTRUCTIONS
#
# sudo pip install splinter
# sudo pip install selenium
# brew install chromedriver
@Gerst20051
Gerst20051 / Info.plist
Last active January 26, 2016 17:32
My Version Of A PList File
<?xml version="2.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD CPLIST 2.0//EN" "http://www.apple.com/DTDs/PropertyList-2.0.dtd">
<plist version="2.0">
<dict key="root">
<string key="CFBundleDevelopmentRegion">en</string>
<array key="LSApplicationQueriesSchemes">
<string>fbapi</string>
<string>fb-messenger-api</string>
</array>
<bool key="LSRequiresIPhoneOS">true</bool>
@Gerst20051
Gerst20051 / swiftparams.html
Last active October 30, 2017 19:43
Swift Params Utility
<html>
<head>
<title>Swift Params</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style type="text/css">
.string { color: green; }
.number { color: darkorange; }
.boolean { color: blue; }
.null { color: magenta; }
.key { color: red; }
@Gerst20051
Gerst20051 / dict2xml.py
Created February 16, 2016 23:58 — forked from reimund/dict2xml.py
Simple dictionary to xml serializer.
"""
Simple xml serializer.
@author Reimund Trost 2013
Example:
mydict = {
'name': 'The Andersson\'s',
'size': 4,
@Gerst20051
Gerst20051 / css.yml
Created February 22, 2016 20:50
CSS Yaml Format
---
\#ws_welcome_title:
color: \#7BBBE4
.ui-btn.ui-checkbox-off\:after:
background-color: \#0075B8 !important
opacity: 1
\#timePicker:
background-color: \#444 !important
@Gerst20051
Gerst20051 / injection.php
Last active March 17, 2016 23:15
Database Injection Class
#!/usr/bin/php
<?php
if (ob_get_length()) ob_end_clean();
$database_injection = new DatabaseInjection();
class DatabaseInjection
{
public static $backspace = "\x08";
@Gerst20051
Gerst20051 / expand_it.js
Last active April 6, 2016 16:20
CodeFights Solutions
// https://codefights.com/challenge/wwPuroz78u6yA8cGD
function Expand_It(s, k) {
return s.match(/\w\d+/g).sort().reduce(function (a, b) {
return a + b[0].repeat(+b.slice(1));
}, '')[k - 1] || '-1';
}
function Expand_It(s, k) {
return s.match(/.\d+/g).sort().find(function (a) {
@Gerst20051
Gerst20051 / directorybrowser.sh
Last active April 12, 2016 15:16
Directory Browser
#!/usr/bin/env bash
IFS=$'\n'
KEY_UP=$'\033[A'
KEY_DOWN=$'\033[B'
KEY_RIGHT=$'\033[C'
KEY_LEFT=$'\033[D'
current_directory="$PWD"
search_directory="$HOME"
@Gerst20051
Gerst20051 / playlists.json
Last active June 25, 2016 03:51
Music Playlists
[
{
"name": "Playlists",
"items": [
"Current Popular Artists",
"Current Popular Songs",
"A Cappella",
"Advice Songs",
"Alternative Top 100",
"Annoying Singers",
@Gerst20051
Gerst20051 / README.md
Created June 25, 2016 02:03 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]