Skip to content

Instantly share code, notes, and snippets.

View pawndev's full-sized avatar
:octocat:
Trying to quit vim

Coquelet Christophe pawndev

:octocat:
Trying to quit vim
View GitHub Profile
@pawndev
pawndev / france_departments.json
Last active January 21, 2019 08:00
Just a JSON that contains bounding box geocode for all france department
{
"franceDepartments": {
"01": {
"name": "Ain",
"bounds": {
"n": "46.519953",
"e": "6.170198",
"s": "45.611093",
"w": "4.728067"
}
@pawndev
pawndev / prepare-commit-msg
Last active July 19, 2019 11:55
pre-commit-msg
#!/bin/sh
BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *')
if [ -n "$BRANCH_NAME" ] && [ "$BRANCH_NAME" != "master" ] && [ "$BRANCH_NAME" != "(nobranch)" ]; then
echo "$BRANCH_NAME | $(cat $1)" > $1
fi
@pawndev
pawndev / lock
Created September 3, 2018 18:20
#!/bin/bash
scrot /tmp/screenshot.png
convert /tmp/screenshot.png -blur 0x3 /tmp/screenshotblur.png
i3lock -i /tmp/screenshotblur.png
@pawndev
pawndev / cli.sh
Created July 23, 2018 11:53
bash cli argument example
#!/bin/bash
params="$(getopt -o hviuc: -l help,version,install,update,clean: --name "$0" -- "$@")"
eval set -- "$params"
. ./lib/echos.sh
usage() {
shrug "Dotfiles Installer"
echo "Usage:"
echo " --help -h -? Display this help message."
@pawndev
pawndev / keybase.md
Created July 2, 2018 13:40
keybase verification

Keybase proof

I hereby claim:

  • I am pawndev on github.
  • I am pawndev (https://keybase.io/pawndev) on keybase.
  • I have a public key ASBSOJ7OhHYIJtxJeAUQeXPo4EQUFyInM44mxxDjl6D4RAo

To claim this, I am signing this object:

@pawndev
pawndev / index.ts
Created June 28, 2018 20:58
test sanctuary
import {create, env, Maybe} from 'sanctuary';
const S = create({
checkTypes: true,
env
});
// PART - I
// const first_arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
// const first_elem = S.head(first_arr);
@pawndev
pawndev / hello_world.js
Last active June 25, 2018 06:52
Simple javascript hello world
console.log(
[
(( ! + [] + [] + ![] + [] + [] + ![] + ! + [] + [] + ![] + [] + [] + ![] + [] + ![] + [] + ![] + ![] +
true + [] + true + [] + [] + (true) + true +
![] + ![] + ![] + ![] + ! + [] + ![] + ![] +
![] + ![] + 1
)).length,
(( ! + [] + [] + ![] + [] + [] + ![] + ! + [] + [] + ![] + [] + [] + ![] + [] + ![] + [] + ![] + ![] +
true + [] + true + [] + [] + (true) + true +
![] + ![] + ![] + ![] + ! + [] + ![] + ![] + ![] + [] + (undefined - 6)
#!/bin/bash
scrot /tmp/screenshot.png
convert /tmp/screenshot.png -blur 0x3 /tmp/screenshotblur.png
i3lock -i /tmp/screenshotblur.png
using System;
using System.Collections.Generic;
using System.Text;
namespace PawnLib.Utils
{
public interface IStore
{
}
@pawndev
pawndev / Dockerfile
Created November 21, 2017 10:17 — forked from renzok/Dockerfile
docker: mapping host uid and gid to user inisde container
FROM debian:jessie
ENV USER=boatswain USER_ID=1000 USER_GID=1000
# now creating user
RUN groupadd --gid "${USER_GID}" "${USER}" && \
useradd \
--uid ${USER_ID} \
--gid ${USER_GID} \
--create-home \