Skip to content

Instantly share code, notes, and snippets.

@helpshift
helpshift / index.html
Created November 7, 2013 07:13
Full page helpshift support embed
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="minimum-scale=1, maximum-scale=1, width=device-width">
<title> ***Your support page title here*** </title>
<meta name="description" content=" ***Your support page description here*** ">
@slottermoser
slottermoser / Setup.md
Last active January 2, 2016 18:43
Everything I needed to do to get the GitLab Vagrant VM up and running.

After running vagrant up and logging into the box with vagrant ssh

Setup gitlab.yml

You'll want to edit /vagrant/gitlabhq/config/gitlab.yml to your dedired settings for your dev environment, as well as change the default user to the vagrant user as the default git user does not exist:

    # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
    user: vagrant
exports.definition =
config:
adapter:
type: "rest"
name: "Agent"
extendModel: (Model) ->
_.extend Model::,
url: ->
@JCook21
JCook21 / deploy.rb
Created November 11, 2012 18:29
Sample Capifony Deployment script
# Deployment server info
set :application, "APP NAME"
set :domain, "APP DOMAIN NAME"
set :deploy_to, "/path/on/live/server"
set :app_path, "app"
set :web_path, "web"
set :maintenance_basename, "maintenance"
# SCM info
set :repository, "GIT REMOTE REPO URL"
@crazygit
crazygit / save_docker_images
Last active April 6, 2016 13:14
Save all docker images to tar files for copy to another machine
#!/usr/bin/env bash
####################################################################
# Usage:
# Save all docker images to tar files for copy to another machine
####################################################################
images=$(docker images | awk 'NR>1 && $1 != "<none>" {printf("%s:%s\n", $1, $2)}')
for image in $images
do
@satyadeepk
satyadeepk / log-parse.sh
Last active April 27, 2016 17:01
Drain Parse.com logs to a file
#!/bin/sh
# Restartes the parse log if it crashes
# stdbuf flushes the Parse log buffer so they come in real time
until stdbuf -oL /usr/local/bin/parse log -f > info.log; do
echo "Parse log crashed with exit code $?. Respawning.." >&2
sleep 1
done
@kwhinnery
kwhinnery / howto.md
Created May 13, 2013 00:42
Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes.

Automatic TiShadow Installs

Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes. Edit your JS files in a text editor, save, then switch to the test device or simulator. Profit.

Install supervisor

[sudo] npm install -g supervisor

Execute tishadow run anytime a JavaScript file changes

find-up() {
local path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
if [ "$path" != "" ]
then
echo "$path"
fi
}
<!DOCTYPE html>
<html>
<head>
<style>
#map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
position: absolute;
@tzmartin
tzmartin / video.thumbnail.js
Created July 10, 2012 17:46
Create Thumbnail Image From Video File, Titanium Mobile
/**
Create Thumbnail of Video File
This snippet captures a thumbnail JPG image, based on a frame @ 2 second time-lapse.
Titanium Mobile
*/
var movie = Titanium.Media.createVideoPlayer({
contentURL:FILENAME,