Skip to content

Instantly share code, notes, and snippets.

On the trip to Mars

MachX machsix

On the trip to Mars
  • Mars
Block or report user

Report or block machsix

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 promise_in_for.js
// let each promise in for to finish
function test(n) {
let promiseChain = Promise.resolve();
for (let i = 0; i < n; i++) {
const makePromise = (j) => () => new Promise((resolve,reject)=> {
setTimeout(resolve, j*1000);
if (j < 5 ) {
machsix / mount-bitlocker
Last active Jul 12, 2019 — forked from dumbledore/mount-bitlocker
Mount/umount wrapper for dislocker on Linux x64
View mount-bitlocker
function usage() {
echo "$(basename ${0}) <partition> <password>"
echo "Unlocks and mounts a bitlocker partition as read-only"
echo "Get by lsblk -f"
// ==UserScript==
// @name OwO, whats this :D
// @namespace
// @version 0.2
// @description try to take over the world!
// @author Christopher König
// @include *
// @connect
// @grant GM_registerMenuCommand
// @grant GM_setValue
View npm-git-log-module.js
const {spawnSync} = require("child_process");
const path = require("path");
const gitLog = function(cwd, obj, magicKey) {
magicKey = "^^" || magicKey;
cwd = cwd || ".";
const args = ["log"];
let logFormat = {
commit: "%H",
machsix /
Created Feb 22, 2019 — forked from chrisroos/
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
# or, instead of backing up trustdb...
machsix / frp
Created Feb 7, 2019 — forked from ihipop/frp
FRP systemd 启动脚本
View frp


Description=FRP Server Daemon

ExecStartPre=-/usr/sbin/setcap cap_net_bind_service=+ep /opt/bin/frps
ExecStart=/opt/bin/frps -c /opt/etc/frps.ini
View travis_example.yaml
email: false
- postgresql
- docker
postgresql: "9.4"
language: go
go_import_path: ""
machsix / stringify.js
Created Jul 18, 2018 — forked from cowboy/stringify.js
JavaScript: like JSON.stringify but handles functions, good for creating arbitrary .js objects?
View stringify.js
var stringify = function(obj, prop) {
var placeholder = '____PLACEHOLDER____';
var fns = [];
var json = JSON.stringify(obj, function(key, value) {
if (typeof value === 'function') {
return placeholder;
return value;
}, 2);
View shadowsocks-libev-server-with-standalone-simple-obfs@.service
Description=Shadowsocks-Libev Server Service With Standalone Simple Obfusacting Service
View readin.f90
subroutine readin
use param, only: mnmol, mnat, mnsurf, mngauss, mntmod, mntor, &
mnfrag, mnmol, mntraj, mnfrag, mnoutcome, &
mnbond, pi, amutoau, autoatm, autofs, autoev, kb, &
use c_output, only: idebug, minprinticon, minprinttrapz, maxprint, &
lwrite, nprint
use c_dd, only: lreadin
use c_struct, only: cell, nvibmods, bdfmthr, rijco, nattype, xx0, &
You can’t perform that action at this time.