Skip to content

Instantly share code, notes, and snippets.

View n1k0's full-sized avatar
✏️
writing a github status

Nicolas Perriault n1k0

✏️
writing a github status
View GitHub Profile
@n1k0
n1k0 / 404checker.js
Created January 11, 2013 10:55
A CasperJS script to check for 404 & 500 internal links on a given website
/**
* This casper scipt checks for 404 internal links for a given root url.
*
* Usage:
*
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
*/
/*global URI*/
@n1k0
n1k0 / pre-commit
Created July 7, 2015 13:07
This git pre-commit hook checks for .only remaining in js mocha test files and prevent commiting if any.
#!/bin/sh
# This checks for .only remaining in js mocha test files and prevent
# commiting if any.
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
@n1k0
n1k0 / app.js
Created May 22, 2019 12:54
head hunter email generator
var villes = [
"Agen",
"Ajaccio",
"Albertville",
"Albi",
"Alençon",
"Alès",
"Amiens",
"Angers",
"Angoulême",
[alias]
caca = commit -a -C HEAD --amend
changelog = "!f() { r=${1:-`git describe --tags --abbrev=0`..HEAD}; echo Changelog for $r; git log --reverse --no-merges --format='* %s' $r; }; f"
changes = diff --name-status
ci = commit
cia = commit --amend
ciaa = commit -a --amend
co = checkout
cp = cherry-pick
dic = diff --cached
[alias]
caca = commit -a -C HEAD --amend
changelog = "!f() { r=${1:-`git describe --tags --abbrev=0`..HEAD}; echo Changelog for $r; git log --reverse --no-merges --format='* %s' $r; }; f"
changes = diff --name-status
ci = commit
cia = commit --amend
ciaa = commit -a --amend
co = checkout
cp = cherry-pick
dic = diff --cached
@n1k0
n1k0 / series.md
Last active August 14, 2018 20:02 — forked from twidi/series.md
series a voir
Title Seen Rating ★☆
24 ★★☆☆☆
Ash vs Evil Dead ?
Bates Motel ★★★☆☆
Battlestar Galactica ?
Better Call Saul ★★★★★
Black Mirror ★★★★★
Black Sails ?
Breaking Bad ★★★★★
@n1k0
n1k0 / copy-to-clipboard.html
Last active July 9, 2018 08:22
Copy to clipboard for Chrome and Firefox
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>copy to clipboard for chrome and firefox</title>
</head>
<body>
<button>copy</button>
<script>
function toClipoard(text) {
@n1k0
n1k0 / output.log
Created February 14, 2012 23:55
Casper script
$ casperjs event.js
[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 2/3 file:///Users/niko/Sites/casperjs/test.html (HTTP 0)
[debug] [phantom] start page is loaded
[info] [phantom] Step 2/3: done in 207ms.
[info] [phantom] Step 3/3 file:///Users/niko/Sites/casperjs/test.html (HTTP 0)
[info] [phantom] Step 3/3: done in 310ms.
[info] [phantom] Done 3 steps in 406ms
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n1k0
n1k0 / Main.elm
Created December 14, 2016 17:57
Default Elm app
module Main exposing (..)
import Html exposing (..)
main : Program Never Model Msg
main =
Html.program
{ init = createModel
, view = view