Skip to content

Instantly share code, notes, and snippets.

@opastorello
opastorello / sublime text 4143 license key
Last active April 24, 2024 02:26
sublime text 4143 license key
> * Go to [hexed.it](https://hexed.it/)
> * Click "Open File" and choose your sublime_text.exe **(DON'T FORGET TO BACKUP YOUR EXE FILE)**
> * Go to Search and in "Search for" put: 80 78 05 00 0F 94 C1
> * In Search Type select "Enable replace" and put: 80 78 05 00 0F 94 C1
> * Click "Find next" then "Replace"
> * Do the same thing with: C6 40 05 01 48 85 C9 => C6 40 05 01 48 85 C9
> * Click "Save as" then name it: sublime_text
> * Copy your modified sublime_text.exe to directory Sublime Text
@lukemerrett
lukemerrett / Basic_Game.lua
Created October 30, 2017 20:07
Basic Pico-8 Game
in_progress = 0
start_end_game = 1
game_over = 2
left=0 right=1 up=2 down=3
valid_moves = {left,right,up,down}
function _init()
player = {}
player.x = flr(rnd(120))
@martinwicke
martinwicke / automobile.ipynb
Last active January 9, 2022 08:14
Estimator demo using Automobile dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agaase
agaase / coverIframes
Last active September 18, 2019 18:57
This jquery extended function covers all the iframes inside an element with a transparent div and dispatches any "click"(only click) to the iframe. This is a workaround for the case when you dont want an iframe to swallow touch events on the page and is normally valid in the case of inline ads.
$.fn.coverIframes = function(){
$.each($("iframe",this),function(i,v){
var ifr = $(v);
var wr = $("<div id='wr"+new Date().getTime()+i+"' style='z-index: 999999; opacity: 0; position:absolute; width:100%;'></div>");
ifr.before(wr);
wr.height(ifr.height());
wr.click(function(event){
var iframe = ifr.get(0);
var iframeDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
// Find click position (coordinates)
@jboner
jboner / latency.txt
Last active May 22, 2024 22:32
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter