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
| // Processing 3.0x code to demonstrate seamless loop of 1D noise | |
| // Inspired by, and created in support of: | |
| // "Drawing from noise, and then making animated loopy GIFs from there" by Etienne Jacob (@n_disorder) | |
| // https://necessarydisorder.wordpress.com/2017/11/15/drawing-from-noise-and-then-making-animated-loopy-gifs-from-there/ | |
| // Note: this program has no dependencies, and does not require SimplexNoise. | |
| // Demo GIF: https://media.giphy.com/media/xUOxeU2ELSPeTbevle/giphy.gif or http://gph.is/2Ah5kqG | |
| PGraphics offscreenImg; | |
| float myScale = 0.01; | |
| float radius = 100.0; |
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 | |
| /* | |
| From: https://en.wikipedia.org/wiki/Mean_of_circular_quantities | |
| Parameters: | |
| $angles: array | |
| $degrees: boolean. Angles and result in degrees (default) | |
| */ | |
| function mean_of_angles( $angles, $degrees = true ) { | |
| if ( $degrees ) { | |
| $angles = array_map("deg2rad", $angles); // Convert to radians |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Console] | |
| "ColorTable00"=dword:00000000 | |
| "ColorTable01"=dword:00800000 | |
| "ColorTable02"=dword:00008000 | |
| "ColorTable03"=dword:00808000 | |
| "ColorTable04"=dword:00000080 | |
| "ColorTable05"=dword:00800080 | |
| "ColorTable06"=dword:00008080 |
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
| /* | |
| Add / remove prefixes to DOM element classes. Requieres JQuery. | |
| https://gist.github.com/carloscabo/e0374676c614dd6e6ea19ad4b9ecf9a4 | |
| by Carlos Cabo 2016. MIT License. | |
| How it works: | |
| 1. Loops over the group of elements | |
| 2. For each element if it has any class that matches the regex: | |
| a. If the prefix is NOT present -> adds | |
| b. If the prefix IS present -> removes |
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 | |
| # Clears finished downloads from Transmission. | |
| # Version: 1.1 | |
| # | |
| # Newest version can always be found at: | |
| # https://gist.github.com/pawelszydlo/e2e1fc424f2c9d306f3a | |
| # | |
| # Server string is resolved in this order: | |
| # 1. TRANSMISSION_SERVER environment variable |
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
| // //placehold.it | |
| function randomColorPit( w, h, number, format ) { | |
| var | |
| u = '//placehold.it/'+w+'x'+h+'/{{__c__}}.'+( format ? format : 'jpg' ), | |
| n = number || 1, | |
| r = []; | |
| for (var i = 0; i < n; i++) { | |
| r.push(u.replace('{{__c__}}', (Math.random().toString(16) + '0000000').slice(2, 8))); | |
| } | |
| console.log(r.join("\n")); |
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
| root = "/fullpath/your_project/current" | |
| working_directory root | |
| pid "#{root}/tmp/pids/unicorn.pid" | |
| stderr_path "#{root}/log/unicorn.error.log" | |
| stdout_path "#{root}/log/unicorn.log" | |
| listen 8080 | |
| worker_processes 2 | |
| timeout 30 |
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
| function flexdestroy(selector) { | |
| var $els = $(selector); | |
| $els.each(function() { | |
| var $el = $(this); | |
| var $elClean = $el.clone(); | |
| $elClean.find('.flex-viewport').children().unwrap(); | |
| $elClean |
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, body, div, span, applet, object, iframe, table, caption, | |
| tbody, tfoot, thead, tr, th, td, del, dfn, em, font, img, ins, | |
| kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, | |
| acronym, address, big, cite, code, dl, dt, dd, ol, ul, li, | |
| fieldset, form, label, legend { | |
| vertical-align: baseline; | |
| font-family: inherit; | |
| font-weight: inherit; | |
| font-style: inherit; |