Skip to content

Instantly share code, notes, and snippets.

@zacky1972
zacky1972 / README.md
Last active September 7, 2022 14:04
Distributed Image Processing by Node

DistributedImageProcessing

Distributed Image Processing by Node.

Installation and Usage

  1. mix new distributed_image_processing
  2. cd distributed_image_processing
  3. edit the following files:
  • mix.exs
@cdesch
cdesch / rails_generator_cheat_sheet.md
Last active March 30, 2024 09:07
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

@brablc
brablc / TerminalVim.scpt
Last active December 24, 2016 01:30
Open Vim in Terminal (iTerm) from Finder - copied from http://thepugautomatic.com/2015/02/open-in-iterm-vim-from-finder/ and updated to open in the current terminal
on run {input, parameters}
set cmd to "vim -c startinsert"
if input is not in {} then
set myPath to POSIX path of input
set cmd to "vim " & quote & myPath & quote
end if
tell application "iTerm"
activate
set myTerm to (current terminal)
@lisamelton
lisamelton / transcode-video.sh
Last active September 8, 2023 23:51
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015
@LinusU
LinusU / README.md
Last active July 17, 2021 08:06 — forked from apla/icons_and_splash.js
Icons and Splash images for your Cordova project. (with iOS 7 support)

Usage

Install cordova into node_modules

npm install cordova

Add icons_and_splash.js

@jonathandixon
jonathandixon / Grunt-Cordova-CLI.md
Last active January 5, 2021 22:00
Using Grunt with a Cordova 3 project.

Grunt and Cordova 3

The advantages of using Grunt with Cordova:

  1. It simplifies working with the cordova cli.
  2. It provides a mechanism to copy platform customization to the platforms directory without having to commit the generated plugins and platforms directories to version control.
  3. It provides a way to watch resources and automatically run cordova commands.

Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?

@ProLoser
ProLoser / alerts.html
Last active October 9, 2019 18:38
AngularJS Bootstrap implemented without any additional code
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>
@focustrate
focustrate / save_disney_photos
Created October 27, 2012 19:25
Auto-download Disney Photopass Photos
#!/bin/bash
#
# takes a url like this:
# http://www.disneyphotopass.com/api/photostore/getSharedImageList.ashx?ShareToken=[[token]]
# and saves all the pictures to ./disneypics
#
# url can be found by going to http://www.disneyphotopass.com/photoshare.aspx and sharing photos by email.
# the link will be in the email
[[ -n "$1" ]] || { echo "Please add the share url as a parameter"; exit 0; }
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@PaulCapestany
PaulCapestany / XcodeAutoVersioning.sh
Created May 1, 2012 22:23
Xcode Auto-incrementing Version and Build numbers
# forked from Luke Jernejcic http://mostlybinary.com/2012/04/03/how-to-auto-increment-your-ios-build-number/
BUILDNUM=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
BUILDNUM=$(($BUILDNUM + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILDNUM" "${PROJECT_DIR}/${INFOPLIST_FILE}"
# this splits a two-decimal version string, such as "0.45.123", allowing us to replace the latest build number at the 3rd position
VERSIONNUM=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${PROJECT_DIR}/${INFOPLIST_FILE}")
NEWVERSIONSTRING=`echo $VERSIONNUM | awk -F"." '{print $1 "." $2 ".'$BUILDNUM'" }'`
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $NEWVERSIONSTRING" "${PROJECT_DIR}/${INFOPLIST_FILE}"