Skip to content

Instantly share code, notes, and snippets.

View connectthefuture's full-sized avatar

justthefracts connectthefuture

  • Midwest usa
View GitHub Profile
@kylemanna
kylemanna / 7z+tar.md
Last active September 5, 2024 10:15
Archive with tar + 7z + max compression

Overview

7-zip doesn't preserve the Linux/Unix owner/group of files and possibly other details. Use tar instead because it's designed to preserve these things, then just 7zip the tar archive.

Create the archive

tar cf - --exclude=\*.o -v directory | 7z a -si -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on directory.tar.7z
@elasticskyx
elasticskyx / headlessvm.md
Created August 28, 2012 11:15
Run VirtualBox Virtual Machines in Headless Mode #virtualbox #windows #vm

Setup a Headless Virtual Machine on Windows using Oracle VirtualBox

If you are concerned with having many windows open when running several virtual machines on your Windows server or workstation, then have them run headless using VirtualBox commandline tools. Additionally, you can manage these VM's using RDP (Mircrosoft Terminal Server Connection - mstsc.exe) or SSH access (if enabled)

Install VirtualBox and Extension Packs

  • Download the latest version and install of [Oracle VirtualBox] [vbox]
  • Download the [VirtualBox Extension Pack] [vbox] and install for the same version
@moolex
moolex / www.backuper.sh
Created December 3, 2012 10:28
自动执行本地网站增量备份的脚本(centos+rsync)
#!/bin/sh
# Moyo <dev@uuland.org> @ 2012/02/23 10:00
# @url http://moyo.uuland.org/system/rsync-local-auto-sh/
# DEFINED ~~
# 脚本所在目录
workbase=/home/backup/shell
# 需要备份的网站列表(文件名)
listf=web.rsync.list
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active March 18, 2026 20:19
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:

@ormaaj
ormaaj / asnorder.sh
Last active April 27, 2024 22:07
Array evaluation order tests
#!/usr/bin/env ksh
# Testcase runs in ksh93t or greater. Tests should run in any shell provided
# you can supply all the necessary workarounds, and they correctly interpret
# ksh93 printf %q output (requires $'...'). At least one level of recursive
# arithmetic variable evaluation must also be supported.
# Dan Douglas <ormaaj@gmail.com>
namespace main {
# e.g. add "set -x" to hacks
typeset -A shells=(
@rcoup
rcoup / rsync_parallel.sh
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@sight-machine
sight-machine / binarize.py
Created April 17, 2013 18:30
Image threshold with a side-by-side view using SimpleCV.
from SimpleCV import Image, Color, Display
# Make a function that does a half and half image.
def halfsies(left,right):
result = left
# crop the right image to be just the right side.
crop = right.crop(right.width/2.0,0,right.width/2.0,right.height)
# now paste the crop on the left image.
result = result.blit(crop,(left.width/2,0))
# return the results.
@sight-machine
sight-machine / edges.py
Created April 17, 2013 18:31
A simple Canny edge detector demo using SimpleCV.
# Make a function that does a half and half image.
def halfsies(left,right):
result = left
# crop the right image to be just the right side.
crop = right.crop(right.width/2.0,0,right.width/2.0,right.height)
# now paste the crop on the left image.
result = result.blit(crop,(left.width/2,0))
# return the results.
return result
# Load an image from imgur.
@sight-machine
sight-machine / keypoint.py
Created April 17, 2013 18:31
An example of keypoint detection using SimpleCV.
from SimpleCV import Image, Color, Display
# load an image from imgur
img = Image('http://i.imgur.com/lfAeZ4n.png')
# use a keypoint detector to find areas of interest
feats = img.findKeypoints()
# draw the list of keypoints
feats.draw(color=Color.RED)
# show the resulting image.
img.show()
# apply the stuff we found to the image.
@Jun-Dai
Jun-Dai / import.sh
Last active March 2, 2021 15:53
Script to import my photos from the SD card to my USB stick
echo
echo "source dir: ${PHOTO_SRC_DIR:=/Volumes/EOS_DIGITAL}"
echo "target base dir: ${PHOTO_TARG_BASE_DIR:=/Volumes/Ellington/Raw Imports}"
echo "date: ${FOLDER_DATE:=`date "+%Y-%m-%d"`}"
PHOTO_TARG_DIR="$PHOTO_TARG_BASE_DIR/$FOLDER_DATE"
PHOTO_TMP_DIR="$PHOTO_TARG_BASE_DIR/tmp_`date +%s`"
echo "target folder will be: ${PHOTO_TARG_DIR}"
echo