Skip to content

Instantly share code, notes, and snippets.

@cruzer45
cruzer45 / Original lyrics
Created October 1, 2012 14:59 — forked from alex/Original lyrics
I'm proud to be a unix programmer
If tomorrow all the things were gone,
I’d worked for all my life.
And I had to start again,
with just my children and my wife.
I’d thank my lucky stars,
to be livin here today.
‘ Cause the flag still stands for freedom,
and they can’t take that away.
@cruzer45
cruzer45 / README.markdown
Created November 29, 2012 05:07 — forked from marijn/README.markdown
List of nationalities in YAML, CSV and TXT format

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

##List of countries

I've also compiled a list of countries

@cruzer45
cruzer45 / README.markdown
Created November 29, 2012 05:09 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format

#List of countries

It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.

List of nationalities

I've also compiled a list of nationalities

#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@cruzer45
cruzer45 / html5_video_conv.bash
Created August 27, 2016 08:44 — forked from zpea/html5_video_conv.bash
little shell script to convert video files to the various HTML5 video formats/codecs using ffmpeg. Also generates the line for embedding the video using the videoJS plugin for wordpress.
#!/bin/bash
#
# video conversion script for publishing as HTML 5 video, via videojs (with hd button extension)
# 2011 by zpea
# feel free to use as public domain / Creative Commons CC0 1.0 (http://creativecommons.org/publicdomain/zero/1.0/)
#
FFMPEG=/usr/bin/ffmpeg
HD_SUFFIX='_hd'
@cruzer45
cruzer45 / query_finder.sql
Created January 25, 2017 17:59 — forked from mezis/query_finder.sql
Finding long-running queries in MySQL
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120)
FROM information_schema.processlist
WHERE command <> 'Sleep'
AND info NOT LIKE '%PROCESSLIST%'
ORDER BY time DESC LIMIT 50;
@cruzer45
cruzer45 / BootStrap.groovy
Created October 25, 2019 09:10 — forked from pledbrook/BootStrap.groovy
Embed Vert.x in Grails
import org.vertx.groovy.core.Vertx
class BootStrap {
def init = { servletContext ->
def vertx = Vertx.newVertx()
def httpServer = vertx.createHttpServer()
vertx.createSockJSServer(httpServer).installApp(prefix: '/events') { sock ->
sock.dataHandler { buff ->
sock << buff
@cruzer45
cruzer45 / google-analytics-track-anchors.txt
Created January 12, 2021 01:06 — forked from bronwynv/google-analytics-track-anchors.txt
Gtag.js track URLS with anchor links
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXX-Y"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXX-Y', {
'page_path': location.pathname + location.search + location.hash
});
@cruzer45
cruzer45 / GroovyAnsi.groovy
Created November 30, 2022 19:13 — forked from tvinke/GroovyAnsi.groovy
Simple ANSI colors in the terminal written in Groovy
// Ansi colors in Groovy
// Author: Ted Vinke
import static Ansi.*
println color("BOLD", Ansi.BOLD)
println color("ITALIC", Ansi.ITALIC)
println color("UNDERLINE", Ansi.UNDERLINE)
println color("BLINK", Ansi.BLINK)
println color("RAPID_BLINK", Ansi.RAPID_BLINK)
println color("REVERSE_VIDEO", Ansi.REVERSE_VIDEO)