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 / createrep.coffee
Last active August 29, 2015 14:01
UltraEdit/Python script file for create CfMC repeat blocks out of a list file
__author__ = 'gilcreque'
MAX_LINE_LEN = 300
UltraEdit.activeDocument.dosToUnix
UltraEdit.activeDocument.selectAll()
text_file = UltraEdit.activeDocument.selection
text_array = text_file.split("\n")
file_len = text_array.length
current_line_len = 0
# See what files changed between branches
git diff --name-status master..branch
@gildotdev
gildotdev / template.php
Created December 18, 2013 03:10
Drupal 7 hook method to remove cache busting query strings on css and js files. Related to this post https://drupal.org/node/242875
<?php
/**
* Implements hook_process_html
*/
function templatenamespace_process_html(&$vars) {
$search = array('scripts' => 'src=', 'styles' => 'href=', 'styles' => '@import\surl\(');
foreach ( $search as $var => $word ) {
if ( !empty($vars[$var]) ) {
@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">
@gildotdev
gildotdev / MPUG_Notes_2013-05-06.md
Last active December 17, 2015 01:39
Melbourne Python Users Group - May 6th 2013
@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 / 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)
#!/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 / .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
@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