Skip to content

Instantly share code, notes, and snippets.

@sixstringsg
sixstringsg / make_lazy.sh
Created September 26, 2012 01:49 — forked from KhasMek/make_lazy.sh
A quick script to clean up image file names by removing blank spaces, capitals, redundancies, and adding authorship. It then creates thumbnails and xml entries for later use
#!/bin/bash
# Super lazy way to get all the thing together to add
# more wallpapers to the SwagPapers (or similar) apps.
#
# USAGE: ./make_lazy $AUTHORS_NAME $FIELD_TO_REMOVE
# FIELD_TO_REMOVE is useful when the original author has
# added an aokp prefix to the image. We already know this
# will be an aokp related image, and is unneeded.
# Currently supported formats are .png and .jpg.
#
@sixstringsg
sixstringsg / gist:3785697
Created September 26, 2012 02:41
thumbnail conversion
FOLDER=images/
i=0
for file in $FOLDER; do
i=$[i+1]
mv $file $i.jpg
cp $i.jpg thumbs/
done
cd thumbs
Process: VLC [1453]
Path: /Volumes/VOLUME/VLC.app/Contents/MacOS/VLC
Identifier: org.videolan.vlc
Version: 2.0.3 (2.0.3)
Code Type: X86-64 (Native)
Parent Process: launchd [277]
User ID: 501
Date/Time: 2012-09-25 23:10:22.430 -0500
OS Version: Mac OS X 10.8.2 (12C54)
<a href="imgs/space/Universe_and_planets_digital_art_wallpaper_denebola.jpg" class="thumb_link"><span class="selected"></span><img src="imgs/space/Universe_and_planets_digital_art_wallpaper_denebola_thumb.jpg" title="Denebola" alt="Denebola" class="thumb" /></a>
Process: VLC [2761]
Path: /Applications/VLC.app/Contents/MacOS/VLC
Identifier: org.videolan.vlc
Version: 2.0.4 (2.0.4)
Code Type: X86-64 (Native)
Parent Process: launchd [277]
User ID: 501
Date/Time: 2012-09-26 16:56:12.118 -0500
OS Version: Mac OS X 10.8.2 (12C54)
#!/bin/bash
export PATH="/usr/lib/ccache:$PATH"
export USE_CCACHE=1
export CCACHE_DIR=/share/ccache
export CCACHE_COMPRESS=1
export CCACHE_UMASK=002
if [ "$(id -gn)" == "ccache" ];then
ccache -M 150G;
fi
@sixstringsg
sixstringsg / khas_is_a_slacker.sh
Created October 12, 2012 17:30 — forked from KhasMek/khas_is_a_slacker.sh
not another image manipulation script. xD
#!/bin/bash
#
# Image template creator and thumbnail maker.
#
# USAGE: ./make_lazy $CUSTOM_TITLE_NAME
# If CUSTOM_TITLE_NAME is blank, it will use the actual filename
# (with underscores and all).
# Currently supported formats are .png and .jpg.
#
# In addition to most normal linux apps, this script will
/*********************************************************************
** Description: **
** This file is a sample code for your reference. **
** **
** Copyright (C) 2011 ElecFreaks Corp. **
** Created by ElecFreaks Robi.W /29 Sep 2011 **
** **
** http://elecfreaks.taobao.com **
*********************************************************************/
#include <NewSoftSerial.h>
@sixstringsg
sixstringsg / physicalpixel.ino
Created December 2, 2015 02:04
Modified script to turn sprinklers off after a set amount of time
/*
Physical Pixel
An example of using the Arduino board to receive data from the
computer. In this case, the Arduino boards turns on an LED when
it receives the character 'H', and turns off the LED when it
receives the character 'L'.
The data can be sent from the Arduino serial monitor, or another
program like Processing (see code below), Flash (via a serial-net
/*
Physical Pixel
An example of using the Arduino board to receive data from the
computer. In this case, the Arduino boards turns on an LED when
it receives the character 'H', and turns off the LED when it
receives the character 'L'.
The data can be sent from the Arduino serial monitor, or another
program like Processing (see code below), Flash (via a serial-net