Skip to content

Instantly share code, notes, and snippets.

View m-vdb's full-sized avatar

Maxime Vdb m-vdb

  • Rasa
  • Berlin
View GitHub Profile
@m-vdb
m-vdb / jquery.counter.js
Last active August 29, 2015 13:57
A simple counter for an element containing a number.
/*
Usage:
<span class="counter">10</span>
$(".counter").countTo({
step: 5, // step, integer
start: 10,
stop: 20
length: 500 // total duration in ms
});
@m-vdb
m-vdb / cdir.html
Created September 16, 2015 22:03
Generate a regex from a list of ip blocks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<script type="text/javascript" src="http://underscorejs.org/underscore.js"></script>
<script>
window.ip_blocks = ['feel me'];
// cidr2regex 0.0.3
// 2009 xenowire
@m-vdb
m-vdb / ip_blocks.json
Last active September 16, 2015 22:18
Hosting provider IP blocks
[
// Amazon
"23.20.0.0/14",
"27.0.0.0/22",
"43.250.192.0/24",
"43.250.193.0/24",
"46.51.128.0/18",
"46.51.192.0/20",
"46.51.216.0/21",
"46.51.224.0/19",
@m-vdb
m-vdb / script.sql
Created October 26, 2015 21:03
Rename job:apply:success events to job:apply:tentative
BEGIN;
LOCK events;
UPDATE events SET type = 'job:apply:tentative' WHERE type = 'job:apply:success' and date >= '2015-09-01';
END;
@m-vdb
m-vdb / original.raven.js
Created August 17, 2016 23:36
Cloudflare minification error
/*! Raven.js 3.4.1 (380d7d0) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),funct
@m-vdb
m-vdb / strategy_ads_url_migration.log
Created February 23, 2017 22:13
strategy_ads_url_migration.log
Updating strategy 5899d86cbaeb406652862ec3, Facebook campaign 6069469346641
12 ads to process.
Updating strategy 56e694ee539cc0432800158b, Facebook campaign 6045272103641
5 ads to process.
Updating strategy 5728b3564a6e5d6b340d286c, Facebook campaign 6048874836441
9 ads to process.
Updating strategy 576a66207f70ff4157416453, Facebook campaign 6055105248841
11 ads to process.
Updating strategy 576a81194a6e5d68aa1a4987, Facebook campaign 6055071385441
18 ads to process.