Skip to content

Instantly share code, notes, and snippets.

View gorillamoe's full-sized avatar
:octocat:
🦍🍌

Marco Kellershoff gorillamoe

:octocat:
🦍🍌
View GitHub Profile
@gorillamoe
gorillamoe / jshint-globals-inline-comment-blocks.js
Created November 7, 2013 14:26
jsHint inline comment blocks for defining globals
/*jshint undef: true, unused: true */
/*global window, document, onmeda_ads */
@gorillamoe
gorillamoe / css3-only-no-javascript-marquee-fx.html
Created November 7, 2013 14:39
Wanted to see how easily marquees could be constructed with CSS: - This demo uses -prefix-free to avoid vendor prefixes - It also requires manual setting of the end text-indent - Everything below the /* Make it pretty */ comment is non-essential - Brought to you by http://twitter.com/jonathansampson Found here: http://jsfiddle.net/jonathansampso…
<!DOCTYPE html>
<html>
<head>
<title>CSS 3 only no JavaScript needed Marquee Effects.</title>
<style>
/* Make it a marquee */
.marquee {
width: 450px;
margin: 0 auto;
overflow: hidden;
@gorillamoe
gorillamoe / build-onmeda-sprout
Last active December 30, 2015 11:39
Custom build-script I wrote to made my everyday life easier at work :)
#!/bin/sh
walialu_timerStart=$(date +'%s')
walialu_currentWoringDir=$(pwd)
walialu_sproutDir='/home/walialu/code/onmeda-sprout/'
walialu_buildOutputDir='/home/walialu/'
cd $walialu_sproutDir
echo '-----------------------------------------------------------------------'
@gorillamoe
gorillamoe / unzip-all-create-dirs.sh
Created December 23, 2013 12:39
Unzip all files in current directory to a directory based on their zipped filename.
ls *.zip|awk -F'.zip' '{print "unzip "$0" -d "$1}'|sh
@gorillamoe
gorillamoe / change-php-enc-to-utf8-with-bom.sh
Created January 10, 2014 12:40
Change encoding to UTF-8 (multiple files at once)
find . -type f -name *.php | xargs vim +"argdo se bomb | se fileencoding=utf-8 | w"
@gorillamoe
gorillamoe / grep-in-rev-named-files.sh
Created January 10, 2014 12:46
Grep in files that are "revisioned" by filename like: test.1.xml, test.2.xml, test.3.xml. This script will only grep in the latest (highest number) file. It searches trough all subdirs too.
find . -name \*.xml -type f -print | cut -c3- | sort -k2 -t. -n -r | awk 'BEGIN{FS="."} a[$1] {next} {a[$1]=1} 1' | xargs grep mooo
@gorillamoe
gorillamoe / php-echo-out-immediately.php
Last active January 4, 2016 05:29
PHP echo out immediately.
<?php
// quick hack, because many browsers need a certain amount of body size
// to be printed in the first place before flush will have an effect
while (ob_get_level()) ob_end_flush();
// implicit flush, so we don't have to call flush all the time
ob_implicit_flush(true);
for ( $i = 0; $i < 113377; $i++ ) {
@gorillamoe
gorillamoe / .bashrc-ps1
Last active August 29, 2015 14:00
BashRC PS1 Fancy Mode
export PS1="\[\e[00;37m\][\[\e[0m\]\[\e[00;32m\]\u\[\e[0m\]\[\e[00;35m\]@\[\e[0m\]\[\e[00;36m\]\h\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;33m\]\W\[\e[0m\]\[\e[00;37m\]]\[\e[0m\]\[\e[00;31m\]\\$\[\e[0m\]"
@gorillamoe
gorillamoe / install-vim-centosdrecksdings.sh
Created June 25, 2014 16:50
Install/Build Vim Latest/Full in CentOS
#!/bin/sh
yum install \
ruby \
ruby-devel \
python \
python-devel \
lua \
lua-devel \
gcc \
@gorillamoe
gorillamoe / metacity-theme-3.xml
Last active August 29, 2015 14:06
Remove Titlebar from Gnome 3 Window when maximized
<!-- Edit /usr/local/themes/[YOUR CURRENT THEME NAME]/metacity-1/metacity-theme-3.xml -->
<frame_geometry name="max" has_title="false" title_scale="medium" parent="normal" rounded_bottom_right="false" rounded_bottom_left="false" rounded_top_left="false" rounded_top_right="false">
<distance name="left_width" value="0"/>
<distance name="right_width" value="0"/>
<distance name="bottom_height" value="0"/>
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
<distance name="title_vertical_pad" value="0"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>