Skip to content

Instantly share code, notes, and snippets.

@Rafe
Rafe / gist:3102414
Created July 13, 2012 02:59
AWK cheatsheet
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008
Compiled by Eric Pement - eric [at] pement.org version 0.27
Latest version of this file (in English) is usually at:
http://www.pement.org/awk/awk1line.txt
This file will also be available in other languages:
Chinese - http://ximix.org/translation/awk1line_zh-CN.txt
USAGE:
anonymous
anonymous / .bash_aliases
Created September 12, 2014 14:37
## Modified commands
alias diff='colordiff' # requires colordiff package
alias grep='grep --color=auto'
alias more='less'
alias df='df -h'
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias nano='nano -w'
alias ping='ping -c 5'
@Hellowlol
Hellowlol / whatthefork
Last active November 21, 2022 07:55
Check all forked branches if they are ahead of master/self open in browser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Dirty script to check if any forks in ahead of master and open that branch commitlist
Warning: Uses alot of api calls
"""
import requests
from requests.auth import HTTPBasicAuth
@di
di / tlds
Created December 4, 2014 20:01
Valid Two-Letter Top Level Domains
ac
ad
ae
af
ag
ai
al
am
an
ao
@alimbada
alimbada / Export-Chocolatey.ps1
Last active April 21, 2024 11:39
Export installed Chocolatey packages as packages.config - thanks to Matty666
#Put this in Export-Chocolatey.ps1 file and run it:
#.\Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
@deathfang
deathfang / Viewport sized typography with minimum and maximum sizes.markdown
Created June 24, 2015 09:49
Viewport sized typography with minimum and maximum sizes

How to build firefox on Windows

@ViktorNova
ViktorNova / rotate-video.sh
Created August 8, 2016 21:33
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
@mgeeky
mgeeky / ubuntu-x11vnc.md
Last active July 30, 2023 00:02
Quick and dirty Ubuntu x11vnc configuration

Ubuntu x11vnc setup with start upon interactive user login to the without-monitor box.

Quick intro

After much time wasted with struggling to get VNC working on Ubuntu that stands for without monitor box - I've compiled the below draft notes on how I finally managed to configure the damn VNC. This should be stated, that I've come a long journey from systemd/init.d configuration scripts, through various VNC daemons (tightvnc, tigervnc, xvnc) and experienced lot of issues (VNC starting before X, VNC not having Xauthority, VNC not being able to open display :0, and so on) .

Finally, this below setup got me working with VNC.

@theho
theho / ubuntu_nvidia_ethminer_setup.sh
Last active June 14, 2022 12:11
Scripts to setup headless ubuntu ethminer for nvidia card
# https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04
# https://www.perfacilis.com/blog/crypto-currency/mining-ethereum-on-ubuntu-with-ethminer.html
# https://gist.github.com/johnstcn/add029045db93e0628ad15434203d13c
# https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks
sudo apt update
sudo apt upgrade
sudo apt-get purge nvidia-cuda*