Skip to content

Instantly share code, notes, and snippets.

View yaliv's full-sized avatar
🪐
Better productivity and beyond

Muhammad Yahya Muhaimin yaliv

🪐
Better productivity and beyond
View GitHub Profile
@JCGoran
JCGoran / cadmus.sh
Last active October 23, 2020 23:29
Script for building and running cadmus
#!/usr/bin/env bash
# a POSIX-compatible shell script that builds cadmus the easy way
# requirements:
# - git
# - python3 (with pip and venv)
# - make
# - cmake
# - a C++ compiler (g++ will do)
@eggsbenjamin
eggsbenjamin / rsa.go
Created May 6, 2019 20:47
Generating an RSA key pair using golang
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"flag"
"log"
"math/big"
@tinovyatkin
tinovyatkin / promisify-readline-question.js
Created October 29, 2017 15:58
`util.promisify` for `readline.question`
'use strict';
// Promisifies readline.question function using node native `util.promisify`
// readline.question takes one callback that returns the answer, so it need custom promisifying
const readline = require('readline');
const { promisify } = require('util');
readline.Interface.prototype.question[promisify.custom] = function(prompt) {
return new Promise(resolve =>
@blzjns
blzjns / tasks.json
Created March 24, 2016 14:12
vscode (Visual Studio Code) task for go lang
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
"version": "0.1.0",
"command": "go", //or absolute path: /usr/local/go/bin/go