Skip to content

Instantly share code, notes, and snippets.

Avatar
🇨🇦
hi

Peter Kieltyka pkieltyka

🇨🇦
hi
View GitHub Profile
View cors-anywhere.js
//
// CORS Anywhere -- Cloudflare Workers edition!
//
// try: https://cors-anywhere.0xhorizon.workers.dev/https://discordapp.com/api/guilds/444586810765475860/widget.json
//
addEventListener('fetch', event => {
event.respondWith(handleRequest(event, event.request))
})
View hyper.nix
{ stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk-pixbuf, gnome3, gtk3, cairo
, freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr
, libXcomposite, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver
, libxcb, nss, nspr, alsaLib, cups, expat, udev, libpulseaudio
, libuuid, at-spi2-atk, at-spi2-core, nodejs-13_x }:
let
libPath = stdenv.lib.makeLibraryPath [
stdenv.cc.cc gtk3 gnome3.dconf atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
View gist:c9ce40f8c75ddf8f4cc5aba4e3426dba
{ pkgs, lib, ...}:
with lib;
let machine = import ~/.dotfiles/machine.nix;
in
{
enable = true;
hooks.postswitch = {
View prometheus
prometheus setup
================
1. sudo docker network create prom
2. mkdir -p /data/prometheus
3. create the prometheus.yml file..
3. sudo docker run -d --name prometheus --network prom -p 9090:9090 -v /data/prometheus:/prometheus-data/ prom/prometheus --config.file=/prometheus-data/prometheus.yml
View pkkb.json
{
"keyboard": "kbdfans/kbd75/rev1",
"keymap": "pkkb",
"layout": "LAYOUT_ansi",
"layers": [
[
"KC_ESC",
"KC__MUTE",
"KC__VOLDOWN",
"KC__VOLUP",
View ngrok.nix
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "ngrok";
src = fetchzip {
url = https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip;
sha256 = "16gd92gqpb2fhgk2r2yzm7ralgcqy0gymh888k6h6n32j6pglzwi";
};
View gist:123032f12052520aaccab752bd3e78cc
##
## HTTP Router benchmarks -- Jan 9, 2019 with Go 1.11.4 on Linux X1 Carbon laptop
##
## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark
## using the most up-to-date version of each pkg as of today. Each router has their own
## pros and cons, so consider the designs of each router to suit your application.
##
## We use the most up-to-date version of each router available in the tests below.
##
View build-abi.js
const path = require('path')
const fs = require('fs')
const contractBuildDir = path.join(path.dirname(require.main.filename), '../build/contracts')
const abiDir = path.join(path.dirname(require.main.filename), '../abi')
fs.readdir(contractBuildDir, (err, files) => {
if (err) {
console.error('whoops', err)
process.exit()
View i3status.toml
theme = "solarized-dark"
[icons]
name = "awesome"
[icons.overrides]
#backlight_empty = " \\u{1f311} "
#backlight_partial1 = " \\u{1f312} "
#backlight_partial2 = " \\u{1f313} "
#backlight_partial3 = " \\u{1f314} "
View index.ts
'use strict';
import { Provider } from './provider';
import { EtherscanProvider } from './etherscan-provider';
import { FallbackProvider } from './fallback-provider';
import { IpcProvider } from './ipc-provider';
import { InfuraProvider } from './infura-provider';
import { JsonRpcProvider, JsonRpcSigner } from './json-rpc-provider';
import { Web3Provider } from './web3-provider';
You can’t perform that action at this time.