Skip to content

Instantly share code, notes, and snippets.

View layerssss's full-sized avatar

Michael Yin layerssss

View GitHub Profile
@layerssss
layerssss / electron-publisher-custom.js
Created January 12, 2022 12:01
This publisher copies files to publish/ folder, to be rsync/upload-ed to any generic HTTP(s) server.
// build/electron-publisher-custom.js
//
// This publisher copies files to publish/ folder, to be rsync/upload-ed to any generic HTTP(s) server.
//
// package.json:
//
// "publish": {
// "provider": "custom"
// }
//
@layerssss
layerssss / docker-compose.yml
Created June 11, 2020 03:02
swarmpit memory leak log
app:
image: swarmpit/swarmpit:1.9
healthcheck:
test:
- CMD
- curl
- -f
- -H
- "Authorization: Bearer XXXXXXX"
- http://localhost:8080/api/services
const resolve = require('resolve');
const Path = require('path');
//
// Play together with:
//
// * https://github.com/entwicklerstube/babel-plugin-root-import
// * https://github.com/benmosher/eslint-plugin-import
//
// API: https://github.com/benmosher/eslint-plugin-import/blob/master/resolvers/README.md
//
@layerssss
layerssss / zeus_shim.sh
Last active December 31, 2015 14:59
use [zeus](https://github.com/burke/zeus) as a shim
# Usage:
#
# Paste these functions into your `.*shrc`, and re-open a new session. Then
# you can use `rails`, `rake`, `rspec` to launch their zeus equivalance. If you
# need to invoke a bash script contains those commands, you'll have to call it
# by `source xxxx.sh`.
#
# It works under rbenv. But not tested under rvm (rvm use shell functions, so it may
# not be compliant with these functions)
@layerssss
layerssss / dabblet.css
Created November 11, 2013 04:09
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@layerssss
layerssss / sample-post.md
Created October 11, 2013 01:44
Sample Post
@layerssss
layerssss / Procfile
Created September 18, 2013 09:35 — forked from dvdsgl/Procfile
web: node server.js
@layerssss
layerssss / Procfile
Created September 18, 2013 09:08 — forked from dvdsgl/Procfile
web: node server.js
@layerssss
layerssss / getroutes.iced
Created September 3, 2013 01:27
extract routes info from any kinds of scripts
#!/usr/bin/env coffee
if process.argv.length!=5
throw new Error 'Usage: ./getroutes.iced input.rsc RTNAME NEXTHOP'
fs = require 'fs'
{
exec
} = require 'child_process'
for route in fs.readFileSync(process.argv[2], 'utf8').match /[\d]+\.[\d]+\.[\d]+\.[\d]+\/[\d]+/g

hello

a = (a)->
  alert 'haha