Skip to content

Instantly share code, notes, and snippets.

View brianly's full-sized avatar
🦙
Don't get much time to hack right now due to 👶

Brian Lyttle brianly

🦙
Don't get much time to hack right now due to 👶
View GitHub Profile
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Embed Buttons Test 2</title>
</head>
<body>
<script type="text/javascript" src="https://c64.assets-yammer.com/assets/platform_embed.js"></script>
@brianly
brianly / foo.log
Created January 11, 2016 04:12 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
@brianly
brianly / repro.py
Created December 15, 2015 16:24
Repro of token issue
import yampy
import logging
import json
import time
from yampy.errors import ResponseError
import constants # protect my oauth token
# Enable this to dump HTTP-level info from yampy lib
@brianly
brianly / free_email_provider_domains.txt
Last active September 8, 2015 18:19 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
163.com
@brianly
brianly / setauthtoken.html
Last active August 29, 2015 14:26
Use setAuthToken to store an OAuth token in a cookie. Long-lived OAuth tokens should be generated through the server-side flow and the token variable should be set from server-side code.
<!DOCTYPE html>
<html>
<head>
<title>setAuthToken() example</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" data-app-id="VlXilc0P6NemTfCzxTKChg" src="https://c64.assets-yammer.com/assets/platform_js_sdk.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function () {
<#
Copyright 2014 Microsoft
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@brianly
brianly / crunchbuntu.sh
Created February 9, 2015 02:03
Install a very basic version of Ubuntu and then make it like CrunchBang (original source: http://crunchbang.org/forums/viewtopic.php?id=36252)
# do mini-install from http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/mini.iso
# next do wget http://pastebin.com/raw.php?i=K8AmdciE -O- | tr -d '\r' > install.sh && chmod +x install.sh && ./install.sh
mkdir crunchbuntu && pushd crunchbuntu
# libvala dependency was renamed to vala in trusty, get an older package
wget -c https://launchpad.net/~vala-team/+archive/ubuntu/ppa/+files/libvala-0.10-0_0.10.4-1ubuntu1~lucid1_amd64.deb
sudo dpkg -i libvala-*
# add waldorf repository and install crunchbang packages
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@brianly
brianly / update.cs
Last active August 29, 2015 14:05
Update a user profile in Yammer with a PUT request. Could be improved by using the newer HttpClient library.
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
<script type="text/javascript">
// This is to deal with IE and style leakages
// see: http://stackoverflow.com/a/10557782/22466
(function () {
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
var completed = false;
style.type = 'text/css';