This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. PUT THIS SCRIPT IN YOUR APP's RES folder, for example /Users/myname/Developer/MyAndroidProject/app/src/main/res | |
# 2. UPDATE THIS VARIABLE to point to your local clone of https://github.com/google/material-design-icons | |
# if you don't alread have it git clone [email protected]:google/material-design-icons.git | |
basefolder="/Users/myname/Developer/material-design-icons" | |
# 3. Find Material Icons on https://design.google.com/icons/ and note the group and icon name and use this script to suck them into your project | |
if [ $# -lt 2 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'levenshtein' | |
# Given two files with lists (one item per line) see if you can fuzzy match strings between the two. | |
# Only prints out matching strings and the match distance (lower is better, scale is normalized 0.0-1.0) | |
shortList = [] | |
File.open("shortList", "r") do |f| | |
f.each_line do |v| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'open-uri' | |
# TODO GET YOUR OWN URL AND AUTH TOKEN | |
# See Foursquare API Explorer at https://developer.foursquare.com/docs/explore#req=venues/search%3Fll%3D40.0879508,-75.3941218 for new URL | |
source = "https://api.foursquare.com/v2/venues/search?ll=40.0879508,-75.3941218&limit=50&radius=100000&oauth_token=GETYOUROWN" | |
# 39.9165295,-75.144234 IKEA SOUTH PHILLY | |
# 39.9205883,-75.145728 South Philly big box stores | |
# 40.0879508,-75.3941218 KOP mall | |
data = JSON.load(open(source)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wundeclared-selector" | |
//whatever code using undeclared selector | |
#pragma clang diagnostic pop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://trevmex.com/post/7320627392/how-to-add-git-and-subversion-info-to-a-bash-prompt | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo " ("${ref#refs/heads/}$(parse_git_dirty)")" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## name: All transition questions | |
## description: | |
## This is the template to display all transition questions. The structure that is associated with this template directly is not really used. | |
## Instead it depends on the TransitionQuestion template and TransitionQuestion structure. | |
## The $structureId, below needs to be updated with the id of the TransitionQuestion structure in your instance of Liferay. | |
#* update your portal-ext.properties to add these two lines: | |
#allow velocity templates to use the serviceLocator variable | |
journal.template.velocity.restricted.variables= | |
*# | |
## -------------------------------------------- |