Skip to content

Instantly share code, notes, and snippets.

パドル〜 パドル〜

Stefano Pigozzi pigoz

パドル〜 パドル〜
Block or report user

Report or block pigoz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mpv.js
const net = require("net");
const crypto = require("crypto");
const process = require("process");
function random() {
return crypto.randomBytes(4).readUInt32LE(0);
function connect() {
const socket = process.env.SOCKET || "/tmp/mpv.sock";
View setrefresh.swift
import CoreGraphics
func display() -> CGDirectDisplayID? {
let max: UInt32 = 32;
let displays = UnsafeMutablePointer<CGDirectDisplayID>.allocate(capacity: Int(max));
let size = UnsafeMutablePointer<UInt32>.allocate(capacity: 1);
CGGetActiveDisplayList(max, displays, size);
pigoz / useMedia.tsx
Last active Feb 26, 2019
useMedia implementation with React Hooks and TypeScript
View useMedia.tsx
import React, { useState, useEffect, useContext } from "react";
type MediaQueries = { [s: string]: MediaQueryList };
type MediaT<T> = { [X in keyof T]: boolean };
function mapValues<T extends object, R>(
object: T,
mapper: (x: T[keyof T], key: keyof T, object: T) => R
): { [K in keyof T]: R } {
const result = {};
View react.rb
# frozen_string_literal: true
require 'ostruct'
class Component
attr_reader :props
def initialize(**props, &children)
@props =
@children = children
type a = { x: string };
type b = { x: int };
type c = { y: string };
type d = A | B(int);
type some_union =
| A(a)
| B(b)
| C(c)
| D(d);
pigoz /
Last active Aug 8, 2017
PS4 list


  • NieR: Automata (1080p60) | 5/5

    • story: 5+ very good and though provoking
    • art direction & design: 5 character design is super good, world is ok
    • gameplay: 5 combat is fun and satisfying, side quests are not bad, jrpg / customization components are nice
    • ost: 5 it's amazing, every piece has 3 variations and they are meshed together seamlessly as you walk through the map, I listen to it while working
    • replayability: 4 not much, no NG/NG+, difficulty scaling is crap as well
pigoz / ciaone.js
Last active Mar 1, 2017
fix link color in github (tapermonkey/greasemonkey)
View ciaone.js
// ==UserScript==
// @name Github Links
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match
// @grant none
// ==/UserScript==

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

pigoz / browser.js
Last active Jan 17, 2017
download listing images from airbnb
View browser.js
const x = JSON.parse($('[data-hypernova-key=listingbundlejs]')[1].text.slice(4, -3))
console.log( => x.xx_large).join("\n"))
pigoz / webpack.js
Created Nov 2, 2016
webpack/gulp integration
View webpack.js
const gulp = require('gulp');
const gutil = require('gulp-util');
const livereload = require('gulp-livereload');
const webpack = require('webpack');
const notify = require('node-notifier');
const config = require('../config');
const manifest = require('../manifest');
const webpackConfigDefault = require('../webpack.config');
You can’t perform that action at this time.