Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jamescun
jamescun / letter.md
Created November 4, 2015 22:48
Letter to Emily Thornberry regarding the Draft Investigatory Powers Bill

Dear Emily Thornberry,

I write to you with a simple hypothetical. Imagine the ISP TalkTalk were required by law to retain 12 months worth of internet access history, now imagine the result of their recent security breach given this. Every TalkTalk customer would potentially have their entire private online world exposed to the public: from the popular teenager, terrified of the views of his family and friends, researching LGBTQ issues; to the jovial receptionist frequenting suicide support forums. None of it legally sensitive, but personally devastating.

TalkTalk are not alone: BT, Virgin and Sky have all had data breaches go public. As long as data security continues to be overlooked at these companies and many others, data breaches will continue to happen. The only way to safe guard the above information from attack, is to not have it at all.

If the proposed Draft Investigatory Powers Bill were to pass, the above would become an all too common reality. Nobody argues against the need for our security serv

@mmcdaris
mmcdaris / go_build_man.md
Last active March 21, 2024 09:59
going through the go build command

usage

go build: compiles the packages named by the import paths, along with their dependencies, the binary does not end up in $GOPATH/bin it gets created in the dirs

go build [-o output] [build flags] [packages]

If the [packages] are a list of .go files, build treats them as a list of source files specifying a single package.

" should become a no op soon
set nocompatible
" dont get warnings about unsaved buffers on buffer switching
set hidden
set runtimepath^=~/.nvim/bundle/taglist
" allways display the statusline
set laststatus=2
let Tlist_Process_File_Always = 1
@petehamilton
petehamilton / README.md
Last active July 8, 2021 09:50
Circle CI Build Status widget for Dashing (Single Builds)

Description

Dashing widget to show the build status of a CircleCI project.

Usage

  • Get a Circle API Token from your Account Dashboard and set it in your environment as CIRCLE_CI_AUTH_TOKEN
  • Add the httparty to your Gemfile and run bundle install

Then:

@ruiwen
ruiwen / fb-angular.js
Last active July 5, 2017 10:40
Wrapping and initialising the Facebook SDK with Angular JS
// Facebook SDK
angular.module('facebook', [])
.directive('fb', ['$FB', function($FB) {
return {
restrict: "E",
replace: true,
template: "<div id='fb-root'></div>",
compile: function(tElem, tAttrs) {
return {
post: function(scope, iElem, iAttrs, controller) {
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@christophercliff
christophercliff / Makefile
Created December 14, 2012 00:19
Makefile for deploying a Wintersmith static site to Github Pages without exposing the source (assumes you're using the default build directory).
deploy:
rm -rf ./build
wintersmith build
cd ./build && \
git init . && \
git add . && \
git commit -m "Deploy"; \
git push "git@github.com:{YOUR NAME}/{YOUR REPO}.git" master:gh-pages --force && \
rm -rf .git
@zyxar
zyxar / exercise.tour.go
Last active April 15, 2024 07:08
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
@rawbitrec
rawbitrec / HelloWorld.cpp
Last active September 27, 2015 06:48
Ye Olde Sea Pluss Pluss!
//created by Eliot Lash and Robert Muller on 10/3/10
//copyright Eliot Lash and Robert Muller 2011
//Welcome to Ye Olde Sea Pluss Pluss!
#include <iostream>
#include <string>
#include "olde.h"
#define normal
@dje
dje / truncated_directory.rb
Created January 3, 2011 21:16
Paging through Fog 1K key limit
files = directory.files.all
truncated = files.is_truncated
while truncated
set = directory.files.all( :marker => files.last.key )
truncated = set.is_truncated
files = files + set
end