Skip to content

Instantly share code, notes, and snippets.

@parweb
parweb / test-railway.js
Created December 1, 2016 17:58
test-railway.js
const addOne = value => {
return value + 1;
};
const failIfOdd = value => {
return value + 1;
};
function railway ( chain ) {
return new Promise((resolve) => {
@parweb
parweb / composer.json
Last active December 7, 2016 21:55
defer any code in PHP
{
"require": {
"opis/closure": "^2.1.0"
}
}
@parweb
parweb / .block
Last active January 28, 2017 00:30 — forked from mbostock/.block
Chord Diagram
license: gpl-3.0
height: 961
border: no
@parweb
parweb / yolo.php
Last active March 2, 2017 10:16
yolo
<?php
echo _DB_SERVER_.' - '._DB_NAME_.' - '._DB_USER_.' - '._DB_PASSWD_.' - '._DB_PREFIX_;
@parweb
parweb / autoChromium.desktop
Last active March 14, 2017 22:57
autorun chrome on pi
[Desktop Entry]
Type=Application
Exec=/usr/bin/chromium-browser --noerrdialogs --disable-session-crashed-bubble --disable-translate --disable-translate-new-ux --disable-infobars --kiosk url_entrypoint
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=AutoChromium
Name=AutoChromium
Comment=Start Chromium when GNOME starts
@parweb
parweb / types.graphql
Created April 10, 2018 00:01
Mutations
type Location {
id: ID! @unique
lat: Float!
lng: Float!
street: String
postalCode: String
city: City
}
type City {
FROM ubuntu:18.04
LABEL name "rqlited"
COPY ./sysctl.conf /etc/sysctl.conf
COPY ./rqlited /tmp/
RUN echo $NOW_URL
features: {
post-booking: true,
maximize: false,
}
@parweb
parweb / test.js
Created April 27, 2020 12:47
zegzeg
jQuery(window).on('load', function() {
jQuery('fieldset#give-ffm-section').toggle();
});
// You can change the selecto to trigger the function on a different gateway
jQuery('.give-gateway-radio-list input').change(e => {
console.log('hello');
});
const fs = require('fs');
const emlformat = require('eml-format');
const htmlToImage = require('html-to-image');
const nodeHtmlToImage = require('node-html-to-image');
const input = 'sample.eml';
const output = 'image.png';
const eml = fs.readFileSync(input, 'utf-8');
emlformat.read(eml, function (error, data) {