Skip to content

Instantly share code, notes, and snippets.

View mikaa123's full-sized avatar

Michael Sokol mikaa123

  • Paris, France
View GitHub Profile
<div id="input">
<textarea placeholder="jeremy, guillaume..."></textarea>
<input type="submit" onclick="mock();"/>
</div>
<p id="output" style="white-space: pre-wrap;">
</p>
<script>
function mock() {
import datetime
import dateutil.parser
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from math import ceil
import pandas as pd
import matplotlib.pyplot as plt
@mikaa123
mikaa123 / lang.js
Created November 19, 2018 15:31
Detect language
const LanguageDetect = require('languagedetect');
const lngDetector = new LanguageDetect();
const AlgoliaIndexTransform = require('algolia-index-transform');
const algoliaIndexTransform = new AlgoliaIndexTransform({
sourceApplicationID: 'source_app_id',
sourceApiKey: 'source_key_here',
sourceIndexName: 'site-search',
destinationApplicationID: 'dest_app_id',
destinationApiKey: 'dest_key_here',
destinationIndexName: 'site-search',
@mikaa123
mikaa123 / .gitconfig
Created January 11, 2017 14:51
git aliases
[alias]
st = status
ci = commit
co = checkout
di = diff
dc = diff --cached
amend = commit --amend
aa = add --all
ff = merge --ff-only
pullff = pull --ff-only
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin('~/.vim/plugged')
Plug 'whatyouhide/vim-gotham'
Plug 'https://github.com/kien/ctrlp.vim.git'
Plug 'tpope/vim-sensible'
Plug 'https://github.com/vim-scripts/Smart-Tabs'
Plug 'bling/vim-airline'
@mikaa123
mikaa123 / gist:a9380af5cd1d56a387ce
Created June 1, 2014 18:32
Simple Api implementation
var express = require('express'),
app = express();
var bodyParser = require('body-parser');
app.use(bodyParser());
var makeResource = require('catnap').makeResource;
// This simulates our datastore.
var users = [{
@mikaa123
mikaa123 / gulpfile.js
Created May 22, 2014 07:45
Gulp xsl reload
var gulp = require('gulp'),
gutil = require('gulp-util'),
spawn = require('child_process').spawn,
livereload = require('gulp-livereload')
replace = require('gulp-replace');
gulp.task('staticsvr', function(next) {
var staticS = require('node-static'),
server = new staticS.Server('./'),
port = 2888;
@mikaa123
mikaa123 / havesome
Last active August 29, 2015 13:56
Makes your browser drink
-----------------------------------------------------------------------------
"THE BEER-WARE LICENSE" (Revision 42):
<misokol123@gmail.com> wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return. -Michaël Sokol
-----------------------------------------------------------------------------
eval(atob("\
dmFyIGpxID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc2NyaXB0Jyk7CmpxLnNyYyA9ICIvL2N \
@mikaa123
mikaa123 / gist:8506887
Created January 19, 2014 16:06
Bigquery JS Frameworks
SELECT COUNT(*)
FROM [githubarchive:github.timeline]
WHERE repository_language == "JavaScript"
AND type == "CreateEvent"
AND (
LOWER(repository_description) CONTAINS "framework" AND (
LOWER(repository_description) CONTAINS "mvc" OR
LOWER(repository_description) CONTAINS "mvvm" OR
LOWER(repository_description) CONTAINS "mvp" OR
LOWER(repository_description) CONTAINS "mv*"
<!DOCTYPE html>
<html>
<head>
<title>title</title>
</head>
<body>
</body>
</html>