Skip to content

Instantly share code, notes, and snippets.

View marsmensch's full-sized avatar

Florian Maier marsmensch

  • MaibornWolff GmbH
  • Germany
View GitHub Profile
@marsmensch
marsmensch / paging.ctp
Created November 7, 2012 19:25 — forked from justinyost/paging.ctp
Paging Element for Twitter Bootstrap and CakePHP 2.0+
<?php $span = isset($span) ? $span : 8; ?>
<?php $page = isset($this->request->params['named']['page']) ? $this->request->params['named']['page'] : 1; ?>
<div class="pagination">
<ul>
<?php echo $this->Paginator->prev(
'&larr; ' . __('Previous'),
array(
'escape' => false,
'tag' => 'li'
),
#!/usr/bin/env osascript
on run argv
tell application "Viscosity"
Connect argv
end
end
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
#!/bin/sh
# Pre-commit hook for git which removes trailing whitespace, converts tabs to spaces, and enforces a max line length.
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

git clone https://github.com/inversepath/u-boot-usbarmory.git
cd u-boot-usbarmory
make distclean
make usbarmory_config
make ARCH=arm
set -e; : ' CHK include/config/uboot.release'; mkdir -p include/config/; echo "2014.07$(/bin/bash /vagrant/u-boot-usbarmory/scripts/setlocalversion /vagrant/u-boot-usbarmory)" < Makefile > include/config/uboot.release.tmp; if [ -r include/config/uboot.release ] && cmp -s include/config/uboot.release include/config/uboot.release.tmp; then rm -f include/config/uboot.release.tmp; else : ' UPD include/config/uboot.release'; mv -f include/config/uboot.release.tmp include/config/uboot.release; fi
set -e; : ' CHK include/generated/version_autogenerated.h'; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2014.07-gfdaebbd\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define CC_VERSION_STRING \"$(/root/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-gcc --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(/root/gcc-li
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@marsmensch
marsmensch / vms.yaml
Created August 3, 2015 17:37
fixes puppet master startup errors during provisioning for https://github.com/Sharpie/puppet-debugging-kit and oscar https://github.com/oscar-stack/oscar/issues/42
---
vms:
# NOTE: All `box:` declarations in this example point to vagrantcloud.com
# and require Vagrant 1.5.0 or newer to function.
- name: pe-201520-master
debug-kit: true
box: puppetlabs/centos-6.6-64-nocm
roles:
- el-stop-firewall # moved to top to avoid firewalling issue
@marsmensch
marsmensch / git-dmz-flow.md
Last active August 27, 2015 12:00 — forked from djspiewak/git-dmz-flow.md
Git DMZ Flow

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea
@marsmensch
marsmensch / Log_2015-9-30_19-01-02.txt
Last active October 1, 2015 18:04
Logcat for TextSecure crashes on OPO with CM 12.1
---- Sep 30, 2015 19:01:02 ----
09-30 19:00:22.160 1691 1691 I Timeline: Timeline: Activity_launch_request id:org.thoughtcrime.securesms time:12743726
09-30 19:00:22.160 799 1440 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.thoughtcrime.securesms/.RoutingActivity} from uid 10226 on display 0
09-30 19:00:22.249 799 1973 I ActivityManager: Start proc 1190:org.thoughtcrime.securesms/u0a51 for activity org.thoughtcrime.securesms/.RoutingActivity
09-30 19:00:22.360 1190 1190 I Timeline: Timeline: Activity_launch_request id:org.thoughtcrime.securesms time:12743926