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 / heart.js
Created June 7, 2017 09:37 — forked from paulirish/heart.js
sweetass heart canvas.
// 99% done by @rauri rochford
// http://js1k.com/2012-love/demo/1071
// i just rAF'd it.
// demo at http://bl.ocks.org/1823634
e = [];// trails
var tmp = require('tmp');
var fs = require('fs');
var exec = require("child_process").exec;
tmp.file({postfix: ".md"}, function(err, path, fd) {
fs.writeFile(path, "* One\n* Two", function(err) {
if(err) return;
exec('github-markup ' + path, function (err, stdout, stderr) {
console.log(stdout);
console.log(path);
function mdRander() {
pandoc $1 | lynx -stdin -dump
}
@pawndev
pawndev / docker-compose.yml
Created August 8, 2017 13:50
docker-compose up <serviceName>
version: '2'
services:
# mysql
mysql:
image: "mysql:5.7.10"
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "admin"
@pawndev
pawndev / Redux-Form-Semantic-UI-React.js
Last active September 10, 2018 22:43 — forked from mairh/Redux-Form-Semantic-UI-React
Semantic-UI-React form validation using redux-form example
// semantic-ui-form.js
import React from 'react';
import PropTypes from 'prop-types';
import { Form, Input } from 'semantic-ui-react';
export default function semanticFormField ({ input, type, label, placeholder, meta: { touched, error, warning }, as: As = Input, ...props }) {
function handleChange (e, { value }) {
return input.onChange(value);
}
@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 \
using System;
using System.Collections.Generic;
using System.Text;
namespace PawnLib.Utils
{
public interface IStore
{
}
#!/bin/bash
scrot /tmp/screenshot.png
convert /tmp/screenshot.png -blur 0x3 /tmp/screenshotblur.png
i3lock -i /tmp/screenshotblur.png
@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)
@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);