Skip to content

Instantly share code, notes, and snippets.

@smutao
smutao / debian_ubuntu_launch_xfce_noVNC.sh
Last active August 9, 2023 07:25
debian/ubuntu+xfce+noVNC
#https://www.server-world.info/en/note?os=Debian_11&p=desktop&f=8
#https://www.server-world.info/en/note?os=Debian_11&p=desktop&f=6
# this script should work on Debian/Ubuntu
# it assumes that you are using 'root' user
# smutao@github, 2023
read -p "Enter VNC password: " mypass
read -p "Enter VNC resolution (e.g. 1920x1080 or 1600x900): " res
@smutao
smutao / appify
Created March 20, 2023 08:23 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@smutao
smutao / draw_hist_ascii.py
Last active July 30, 2022 22:03 — forked from bgbg/asciihist.py
Draw histogram in command line with Python
# draw histogram in command line with Python
# smutao@github, July 30, 2022
#
# usage: $ cat datafile.txt | python draw_hist_ascii.py [nbins] [nscale]
# The input should be one column of numbers to be piped in.
#
# forked from https://gist.github.com/bgbg
from __future__ import print_function
import sys