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
| for branch in $(git for-each-ref --format='%(refname:short)' refs/heads); | |
| do git archive --format zip --output <outputDirectory>/${branch}.zip $branch; | |
| done |
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
| <html> | |
| <head> | |
| <script language="javascript" type="text/javascript" src="libraries/p5.js"></script> | |
| <script type='text/javascript' src='libraries/p5.dom.js'></script> | |
| <script type='text/javascript' src='libraries/sylvester.js'></script> | |
| <style> | |
| /* http://meyerweb.com/eric/tools/css/reset/ |
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
| <?php | |
| /* | |
| Action to create a blog post entry in my Kirby powered site via an IFTTT recipe. In IFTTT I have a an Instagram trigger that calls | |
| this script, sending a POST using the Maake channel with this body: params={{EmbedCode}}&caption=<<<{{CaptionNoTag}}>>> | |
| */ | |
| if((isset($_POST['params']))){ | |
| $subject = urldecode($_POST['caption']); |
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
| class Node { | |
| private PVector vel; | |
| private PVector loc; | |
| private PVector acc; | |
| Node () { | |
| vel = PVector.random2D(); | |
| loc = new PVector(random(width), random(height)); |
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
| String encodeURL(String s){ | |
| try { | |
| String encoded = URLEncoder.encode(s, "UTF-8"); | |
| return encoded; | |
| } catch (Exception e) { | |
| return "ERROR"; | |
| } | |
| } |
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
| PGraphics typeToImage(String txt,PFont theFont, int fontSize){ | |
| PImage img; | |
| ArrayList<PVector> vectors = new ArrayList(); | |
| PGraphics pg; | |
| textFont(theFont); | |
| textSize(fontSize); | |
| textAlign(LEFT,TOP); | |
| float w = textWidth(txt); | |
| float h = fontSize; | |
| pg = createGraphics(int(w),int(h),JAVA2D); |
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
| int getMinValue(Table t, String colName){ | |
| int minValue = Integer.MAX_VALUE; | |
| for (TableRow row: t.rows()) { | |
| int val = row.getInt(colName); | |
| if (val < minValue) minValue = val; | |
| } | |
| return minValue; | |
| } | |
| int getMaxValue(Table t, String colName){ |
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
| import java.util.Comparator; | |
| import java.util.Collections; | |
| Collections.sort(keywords, new CustomComparator()); | |
| public class CustomComparator implements Comparator<Keyword> { | |
| @Override | |
| public int compare(Keyword o1, Keyword o2) { | |
| Integer val1 = (Integer) o1.keywordColor; | |
| Integer val2 = (Integer) o2.keywordColor; |
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
| ArrayList alphaMaskToVectors(String file){ | |
| PImage img = loadImage(file); | |
| ArrayList vectors = new ArrayList(); | |
| for (int i=0; i < img.width; i++) { | |
| for (int j=0; j < img.height; j++) { | |
| color c = img.get(i,j); | |
| if (red(c) != 255 && green(c) != 255 && blue(c) != 255) { | |
| vectors.add(new PVector(i,j)); | |
| } |
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
| // Requires the DawesomeToolkit http://cloud.brendandawes.com/dawesometoolkit | |
| import java.util.Collections; | |
| import java.util.Random; | |
| import dawesometoolkit.*; | |
| import processing.pdf.*; | |
| ArrayList<PVector> vectors; | |
| DawesomeToolkit dawesome; |