Skip to content

Instantly share code, notes, and snippets.

View pyrho's full-sized avatar
🕶️
8)

Damien Rajon pyrho

🕶️
8)
View GitHub Profile
var Promise = require('bluebird');
function testFailReject(){
return Promise.reject(new Error('An error happened'));
}
testFailReject()
.error(function(error){

Keybase proof

I hereby claim:

  • I am pyrho on github.
  • I am pyrho (https://keybase.io/pyrho) on keybase.
  • I have a public key whose fingerprint is 5713 1F64 2829 BC4C 20EE 44F2 643C 9F9C E508

To claim this, I am signing this object:

@pyrho
pyrho / gulpfile.js
Last active June 17, 2017 12:23
Simple gulpfile for a typescript project, including sourcemaps support and mocha (support material for https://25.wf/programing/2017/06/13/gulp-and-typescript/)
const gulp = require('gulp');
const ts = require('gulp-typescript');
const sourcemaps = require('gulp-sourcemaps');
const mocha = require('gulp-mocha');
const del = require('del');
const gutil = require('gulp-util');
const config = {
outputDirectory: './build',
inputSourceFiles: [
@pyrho
pyrho / kitty.applescript
Created March 23, 2020 16:11
Alfred Kitty custom terminal integration
on alfred_script(q)
do shell script "/Applications/Kitty.app/Contents/MacOS/kitty @ --to unix:/tmp/mykitty new-window --new-tab"
tell application "kitty" to activate
tell application "System Events" to keystroke q
tell application "System Events"
key code 36 -- enter key
end tell
end alfred_script
# vim:fileencoding=utf-8:ft=conf
# You can include secondary config files via the "include" directive.
# If you use a relative path for include, it is resolved with respect to the
# location of the current config file. Note that environment variables
# are expanded, so ${USER}.conf becomes name.conf if USER=name
# For example:
# include other.conf
# Fonts {{{
@pyrho
pyrho / gist:296e957645a2e5472c6368d6e9fb5fb0
Created January 25, 2021 18:23
VSCode launch.json for Typescript AVA unit tests
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run AVA test",
"program": "${workspaceRoot}/node_modules/.bin/ava",
"args": [
"${file}",
@pyrho
pyrho / victor-mono.css
Last active January 2, 2023 19:41
A font file for Blink Shell with the Victor Mono font
@font-face {
font-family: "VictorMono Nerd Font";
font-style: normal;
font-weight: 200;
src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/VictorMono/Light/complete/Victor%20Mono%20Light%20Nerd%20Font%20Complete%20Mono.ttf?raw=true);
}
@font-face {
font-family: "VictorMono Nerd Font";
font-style: normal;
font-weight: 400;
@font-face {
font-family: "RobotoMono Nerd Font";
font-style: normal;
font-weight: 200;
src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/RobotoMono/Light/complete/Roboto%20Mono%20Light%20Nerd%20Font%20Complete.ttf?raw=true);
}
@font-face {
font-family: "RobotoMono Nerd Font";
font-style: normal;
font-weight: 400;
black = '#1d292f';
red = '#f7768e'; // red
green = '#9ece6a'; // green
yellow = '#e0af68'; // yellow
blue = '#7aa2f7'; // blue
magenta = '#bb9af7'; // pink
cyan = '#7dcfff'; // cyan
white = '#a9b1d6'; // light gray
lightBlack = '#414868'; // medium gray
lightRed = '#f7768e'; // red
$fn= $preview ? 16:32;
// bottle
bottleD=73-10;
bottleHullTol=0.2; // render tolerance
// bike frame
frameD=35+.5;
framePadD=11+.5; // diameter of pads around frame holes
framePadH=0; // 0 for flat back