Skip to content

Instantly share code, notes, and snippets.

View vjo's full-sized avatar

Victor Jolissaint vjo

View GitHub Profile
@vjo
vjo / gopro-timelapse.sh
Last active February 20, 2016 14:06
Sort my gopro timelapse photos and convert it in a movie with ffmpeg
# Create a directory where to move your renamed photos
mkdir img
# Rename your first G0....JPG photos in img/img000001.JPG and so on
x=1;for i in G0*JPG; do counter=$(printf %06d $x); ln "$i" img/img"$counter".jpg; x=$(($x+1)); done
# Rotate photos if needed
cd img
for file in *.jpg; do convert $file -rotate 180 rotated-$file; done
@vjo
vjo / get_tweet_id.js
Created August 27, 2013 16:09
Make a Twitter search, past this code in a JS console and you get the tweet id of the matching tweet
// this line will copy the result in your clipboard
//copy($.makeArray($(".content").find('.time').find('a').map(function() {return $(this).attr("href");})).map(function(el) {return el.split("/")[3];}).join("\n"))
$.makeArray(
$(".content").find('.time').find('a').map(
function() { return $(this).attr("href"); }
)
).map(
function(el) { return el.split("/")[3]; }
).join("\n");
@vjo
vjo / favicon.html
Last active December 22, 2015 15:29
Favicon cheat sheet snipset - from https://github.com/audreyr/favicon-cheat-sheet
<html>
<head>
<!-- For the main favicon itself, it's best for cross-browser compatibility not to use any HTML.
Just name the file favicon.ico and place it in the root of your domain. -->
<!-- Touch icon for iOS 2.0+ and Android 2.1+ -->
<link rel="apple-touch-icon-precomposed" href="path/to/favicon-152.png">
<!-- IE 10 Metro tile icon -->
<meta name="msapplication-TileColor" content="#FFFFFF"> <!-- replace #FFF -->
<meta name="msapplication-TileImage" content="/path/to/favicon-144.png">
@vjo
vjo / call_to_action.html
Last active December 26, 2015 23:48
Nice button, call to action.
<html>
<!-- From http://ionicons.com/ -->
<head>
<style>
body {
box-sizing: border-box;
padding-top: 136px;
border-top: 1px solid #4F8EF7;
color:#373737;
text-align: center;
import re
import operator
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
d = {}
pound = 1
score = 0
str = 'Good luck in the Facebook Hacker Cup this year!'
str = str.lower()
@vjo
vjo / template_web.html
Created March 18, 2014 13:16
Template web page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Company Homepage">
<meta name="author" content="Victor Jolissaint">
<title>Page title</title>
<link rel="author" href="humans.txt">
@vjo
vjo / meetup_waiting_pos.js
Last active August 1, 2016 17:38
Find your position in Meetup.com waiting list
$("#rsvp-list-waitlist h5")
.map(function(i, el) {return {"pos": i, "name": $(el).text()}})
.filter(function(i, el) {return el["name"].indexOf("Your name") >= 0;});
@vjo
vjo / get_flws.sh
Created April 23, 2014 14:23
Curl and echo a followers_count from Twitter account
f=$(curl -Ls twitter.com/y3ty | grep -Po '(?<=followers_count&quot;:)[0-9]+'); echo $f
@vjo
vjo / vimrc_reload-firefox
Last active July 20, 2017 19:34
Reload Firefox current page from Vim
While developing website / webapp it's great to force your browser to reload when modifiying code.
You have plenty of solutions like LiveReload.
I wanted to be able to reload Firefox from vim and this is a simple way to achieve that:
* Install MozRepl (https://github.com/bard/mozrepl/wiki)
* Firefox > Tools > MozRepl > Start
* Be sure you have netcat 'nc' installed
* Add these line in your .vimrc:
@vjo
vjo / button_transition.html
Created July 11, 2014 10:45
Button transition inspiration
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Button hover transition</title>
<style>
/* Button / Transition inspired from http://icorinc.com */
html {