Skip to content

Instantly share code, notes, and snippets.

View jem-computer's full-sized avatar
🌈

Jem jem-computer

🌈
View GitHub Profile
@CoeusCC
CoeusCC / gist:4392058
Created December 27, 2012 21:17
Using CSS to hide buttons in the SocialCount plugin has the unintended side effect of preventing the Google Plus button from functioning properly. I recommend using `display:block` until a better solution is identified.
.socialcount .button {
display: block;
width: 100%;
position: absolute;
left: 0;
bottom: -6px;
text-align: center;
pointer-events: none;
}
@elliottkember
elliottkember / heroku-CVE-2013-0156.rb
Last active December 10, 2015 20:38
CVE-2013-0156 is a nasty vulnerability in many versions of Rails. This script checks all your Heroku apps for this vulnerability in one quick (slow) move. More info: https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
## The quick-and-nasty CVE-2013-0156 Heroku inspector!
## Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku
## Download and run using:
## ruby heroku-CVE-2013-0156.rb
`heroku list`.split("\n").each do |app|
app = app.strip
# Some "heroku apps" lines have === formatting for grouping. They're not apps.
next if app[0..2] == "==="
class people::fromonesrc {
include alfred
include caffeine
include elasticsearch
include flux
include handbrake
include notational_velocity
include onepassword
include screen
include vlc
@naan
naan / source_maps.rb
Last active December 14, 2015 13:48 — forked from alexspeller/source_maps.rb
Monkey patch for Coffee Script v.1.6.2 Source Maps for Rails.
# config/initializers/source_maps.rb
if Rails.env.development?
module CoffeeScript
class SourceMapError < StandardError; end;
class << self
def compile script, options
script = script.read if script.respond_to?(:read)
@olizilla
olizilla / meteor-dump.sh
Last active May 29, 2016 02:18
Dump a mongo db from a live meteor app to a local dump dir.
#!/bin/bash
# __
# _____ ____ _/ |_ ____ ____ _______
# / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \
# | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/
# |__|_| / \___ > |__| \___ > \____/ |__|
# \/ \/ \/
#
# .___
# __| _/ __ __ _____ ______
@brendandawes
brendandawes / ISOPaperSizes.pde
Created April 23, 2013 15:44
ISO 216 paper sizes in pixels @ 300dpi
/*
ISO 216 paper sizes converted to pixels @ 300dpi
Drop this file in your Processing sketch and use like so: size(A1w, A1h);
*/
final int A5w = 1748;
final int A5h = 2480;
final int A4w = 2480;
anonymous
anonymous / cristina-fernandez-kirchner-tweets.md
Created July 3, 2013 11:13
President Cristina Fernandez de Kirchner's tweets translation about Evo Morales issue

This is an extraction from http://www.mail-archive.com/[email protected]/msg00111.html

Edward Snowden is apparently still in Moscow, but Evo Morales's plane leaving Moscow was denied passage over France, Portugal, and apparently Italy, on suspicion that it contained Snowden. (This is how European countries show their gratitude for leaks showing the extent of USG spying on it?) It was forced to land in Vienna, where I'm still not clear on whether it was searched.

President Cristina Fernandez de Kirchner posted an outraged, and

vec2 rotate(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(c, s, -s, c);
return m * v;
}
@kylemcdonald
kylemcdonald / Triplet Loss.ipynb
Last active November 29, 2022 20:42
Experimenting with triplet loss embeddings.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from tkinter import *
from PIL import ImageTk,Image
import time
import os
targetImageWidth = 850
targetImageHeight = 400
inputImageWidth = 0
inputImageHeight = 0