Skip to content

Instantly share code, notes, and snippets.

@koshigoe
koshigoe / mount-ram.sh
Created February 11, 2011 14:57
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@febuiles
febuiles / songs.md
Last active July 1, 2022 03:45
Fetching lyrics in Unix

Fetching lyrics in the command line

Objective: Print the lyrics for the current playing song.

How: We'll create a small bash script to do the fetching for us (using curl) and then we'll display it either in the terminal or in our $EDITOR

Get the current song

First we'll need to get the name of the current song and its artist:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 30, 2024 04:25
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ryin
ryin / tmux_local_install.sh
Last active July 13, 2024 00:42
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@mherwig
mherwig / VoiceControl.sh
Last active December 11, 2015 23:18 — forked from anonymous/gs_sp_to_txt.sh
Simple voice control demonstration using google's speech-api. For demonstration purpose I added the unix commands 'ls' and 'whoami' that map to the spoken phrases "List directory" and "Who am I?"
#!/bin/bash
#
# Author: Mike Herwig
# Description:
# Updated voice control demonstration using google's speech-api
# The main difference to the previous script I uploaded to my Gist is that it's using sox for recording now
# and only records your voice to the disc when sox detects sound
# Dependencies: sox, wget
LANG="en"
@shime
shime / _readme.md
Last active November 8, 2020 08:54 — forked from ryin/tmux_local_install.sh
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@larryxiao
larryxiao / * - pdf
Last active October 18, 2017 08:56
extract text from pdf then remove unnecessary characters change '\n' into '||' change \f' into ' '
libreoffice --convert-to pdf *.ppt
libreoffice --headless --convert-to pdf *.ppt
#!/bin/bash
#
# Author: Mike Herwig
# Enhanced: Jacer Omri
# Description:
# Simple voice control demonstration using google's speech-api
if [ -z "$1" ]
then
echo "No language supplied, using en\n"
@swapnil-warke
swapnil-warke / poj_2663_AC.cpp
Created July 23, 2013 10:17
poj2663,dynamic programming
/*
** id :template
** author : swap_coder
** time:
*/
#include<vector>
#include<algorithm>
#include<cstdio>