Skip to content

Instantly share code, notes, and snippets.

View gildotdev's full-sized avatar
🗨️
#BLM

gil.dev gildotdev

🗨️
#BLM
View GitHub Profile
@gildotdev
gildotdev / txt2rtf.sh
Created October 27, 2010 17:13
Simple Bash script to create a rich text format file from a plain text file
#!/bin/sh
#check to see if arguments are set
E_BADARGS=65
if [ ! -n "$1" ]
then
echo "Usage: `basename $0` textfilename [rtffilename optional]"
exit $E_BADARGS
fi
@gildotdev
gildotdev / newdomain.sh
Created November 7, 2010 18:01
Bash script to add new domain to slicehost and create nginx config file for it
#!/bin/sh
#Setup a new domain on slicehost using layout outlined here:
#http://articles.slicehost.com/2008/5/16/ubuntu-hardy-nginx-virtual-hosts
#and creating an nginx config file based on this article:
#http://www.dailycupoftech.com/2009/02/24/basic-slicehost-slice-setup-part-7-create-the-virtual-host-website/
# ----------------------------------------------------------------
#check to see if arguments are set
E_BADARGS=65
@gildotdev
gildotdev / THEMENAME_menu_link.php
Created April 20, 2011 20:11
This Drupal 7 function will allow you to use anchor names/fragments in your menu links. This functions goes in your template.php file in your theme directory. Remember to change THEMENAME to your theme's name.
@gildotdev
gildotdev / ffmpeg.txt
Last active October 30, 2017 00:31
ffmpeg cli commands
## extract audio from .avi as .aac (conversion from another audio codec)
ffmpeg -i foo.avi -acodec aac -ab 128k -strict experimental bar.aac
## extract audio from .avi as .mp3 (no conversion, just copy)
ffmpeg -i foo.avi -acodec copy bar.mp3
## convert .mp3 to .aac
ffmpeg -i foo.mp3 -acodec aac -ab 128k -strict experimental bar.aac
## extract single frame as image from .mp4
@gildotdev
gildotdev / .screenrc
Created January 24, 2012 20:23
My rc startup file for GNU screen
#displays status line at bottom of screen window
hardstatus alwayslastline
#configuration of text to show in status line http://aperiodic.net/screen/man:string_escapes
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
# binding the F1 - F8 keys to the first 8 screens, F11 = previous | F12 = next
bindkey -k k1 select 0
bindkey -k k2 select 1
bindkey -k k3 select 2
#!/bin/bash
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/palette" --type string "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#00002B2B3636"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "#65657B7B8383"
@gildotdev
gildotdev / subject.bas
Created February 15, 2012 21:41
This Outlook macro will allow you to append tags to the subject line of any message currently selected. To add a macro you must enable the developer menu in Outlook's options. This is based on code I found here http://www.vbaexpress.com/forum/showthread.
Attribute VB_Name = "Subject"
Sub AppendTags()
On Error Resume Next
Dim MsgColl As Object
Dim msg As Outlook.mailItem
Dim objNS As Outlook.NameSpace
Dim i As Long
Dim subjectname As String
Select Case TypeName(Application.ActiveWindow)
@gildotdev
gildotdev / GREL Capitalize Syntax
Created March 29, 2013 00:57
Google Refine Expression Language (GREL) Syntax that will capitalize every word
join(
forEach(
value.trim().split(" "),
v,
v.substring(0,1).toUppercase() + v.substring(1)
)
," ")
@gildotdev
gildotdev / MPUG_Notes_2013-05-06.md
Last active December 17, 2015 01:39
Melbourne Python Users Group - May 6th 2013
@gildotdev
gildotdev / github.html
Last active December 17, 2015 15:29
Github Activity Aside for Octopress
{% if site.github_user %}
<section>
<h2>GitHub Activity</h2>
<ul id="gh_events">
<li class="loading">Status updating...</li>
</ul>
{% if site.github_show_profile_link %}
<a href="https://github.com/{{site.github_user}}">@{{site.github_user}}</a> on GitHub
{% endif %}
<script type="text/javascript">