Skip to content

Instantly share code, notes, and snippets.

@jussiry
jussiry / photos.js
Created March 23, 2020 12:40
Examples on using GUN js
var Gun = require('gun');
var gun = Gun('https://gun-eu.herokuapp.com/gun'); // connect to gun-eu peer (UI prototype also connects to this peer)
// Photos are stored in root -> starling -> photos -path
var photosPath = gun.get('starling').get('photos');
// UNCOMMENT next line to see results, explanation below:
//photosPath.once((res) => console.log(res))
/*
@sanderpick
sanderpick / cafe_install.sh
Last active August 13, 2019 09:02
Installs a Textile cafe node on Linux
#!/usr/bin/env bash
set -e
while getopts r:u:p: option
do
case "${option}"
in
r) RELEASE=${OPTARG};;
u) URL=${OPTARG};;
@tanbro
tanbro / remake_pyconly_wheel.py
Last active February 21, 2020 02:24
A small tool Re-Pack a Python Wheel to a PYC-Only One
# -*- coding: utf-8 -*-
"""
Re-Pack `Wheel` to a PYC-Only One
"""
from __future__ import print_function, unicode_literals
import argparse
import compileall
@yejianye
yejianye / upload_progress.py
Created June 19, 2014 05:18
Show progress bar when uploading a file
# -*- coding: utf-8 -*-
# ############################################################################
# This example demonstrates how to use the MultipartEncoderMonitor to create a
# progress bar using clint.
# ############################################################################
from clint.textui.progress import Bar as ProgressBar
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor
@fourdollars
fourdollars / dkms.sh
Last active January 23, 2017 09:09
Deprecated
https://github.com/fourdollars/scripts/blob/master/ubuntu/dkms-helper.sh
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 21, 2024 01:45
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname