Skip to content

Instantly share code, notes, and snippets.

jules buret kizdolf

  • france
Block or report user

Report or block kizdolf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dlMp3PLaylistsFromYt.js
// just launch node on this file.
/*
There is a lot to do here.
TODO:
-youtube-dl fail to write thumbnail to mp3 file. We need to do it by hand.
- display is ugly as fuck. SO: first create a data structure around spawned
processes. Including playlist rank, track rank, track intel, playlist intel.
Then build a "lib" to retrieve what's the outuput is talking about and insert it into
correct data structure.
then on events trigger display on correc data structure.
View app.angular.js
'use strict';
// Declare app level module which depends on views, and components
angular.module('appName', [
...
'appName.socket'
])
View gitStreamGource.sh
gource \
-s .06 \
-1280x720 \
--auto-skip-seconds .1 \
--seconds-per-day 0.1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
--hide mouse,progress \
View upload.js
request.post(this.props.url)
.attach('file', file, file.name)
.on('progress', function(e){
var elem = {name: file.name, pct: parseInt(e.percent).toString() + '%'};
var current = this.state.uploading;
current[file.name] = elem;
this.setState({ uploading: current });
}.bind(this))
.on('error', function(err){
var current = this.state.uploading;
View ass_to_vtt.js
'use strict';
var fs = require('fs'),
readline = require('readline');
var ass_to_vtt = (file_in, file_out, cb)=>{
var order = [],
gotOrder = false;
fs.writeFileSync(file_out, 'WEBVTT\n\n');
readline.createInterface({
@kizdolf
kizdolf / highlight.js
Created Feb 25, 2016 — forked from jonraasch/highlight.js
Live on-page text highlighting
View highlight.js
/*
highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !!
Highlights arbitrary terms.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
MIT license.
@kizdolf
kizdolf / easyKonami.js
Last active Dec 9, 2017
Konami code js, jQuery
View easyKonami.js
var winner = ()=>{/*do what ever you want*/};
var konami = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65],
i = 0,
l = konami.length - 1;
(document).keyup(function(e){
i = (konami[i] == e.keyCode) ? ((i == l) ? 0 && winner() : i + 1) : 0;
});
View bookmarks.json
[
{
"url" : "https://github.com/nvbn/thefuck",
"title" : " nvbn/thefuck · GitHub",
},
{
"name" : "php",
"links" : [
{
"url" : "https://stackoverflow.com/questions/16496554/can-php-detect-4-byte-encoded-utf8-chars",
@kizdolf
kizdolf / display ms
Created Jul 10, 2015
milliseconds to something like 0h23m4s
View display ms
function msWell(ms) {
return ~~((ms/1000)/3600)+'h'+~~(((ms/1000)%3600)/60)+'m'+~~((ms/1000)%60)+'s';
}
You can’t perform that action at this time.