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 OsimoModal(options){ | |
| this.options = { | |
| 'width' : 500, | |
| 'height' : 400, | |
| 'modal' : true, | |
| 'draggable' : false, | |
| 'showClose' : true, | |
| 'styles' : {} | |
| }; | |
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
| #!/usr/bin/php | |
| <? | |
| # some useful file paths to rememebr | |
| define('NGINX_CONFIG_ROOT', "/etc/nginx/sites-enabled/"); | |
| if($_SERVER['argc'] <= 1) { | |
| show_help_msg(); | |
| } else { | |
| $new_domain = trim($_SERVER['argv'][1]); |
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
| /* | |
| * In order to include libraries, we need to know | |
| * the absolute path to the jsonp-fu directory. | |
| * | |
| * BTW, jfu is a shortcut to jsonpfu that is defined | |
| * as a part of the library. | |
| */ | |
| jfu.set_path('/path/to/jsonp-fu/'); | |
| /* |
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
| /* | |
| * CamanJS image modification example | |
| */ | |
| Caman('path/to/image.jpg', '#canvas-id', function () { | |
| this.brightness(20); | |
| this.contrast(5); | |
| this.saturation(-25); | |
| this.hue(120); | |
| this.colorize('#AF3D15', 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
| <? | |
| /* | |
| * This example would probably work best if you're using | |
| * an MVC framework, but it can be used standalone as well. | |
| * | |
| * This example also assumes you are using Predis, the excellent | |
| * PHP Redis library available here: | |
| * https://github.com/nrk/predis | |
| */ |
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
| <!-- Place in your the <head> of your page --> | |
| <script src='https://githubanywhere.appspot.com/github-anywhere.js'></script> | |
| <script> | |
| GitHubAnywhere(function() { | |
| // use `this` instead of passing the object? | |
| this.buttons(); | |
| }); | |
| </script> | |
| <!-- Place anywhere on your page replaceing :name with a GitHub username and :repo with a repository name. --> |
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
| short_id | views | |
| ---------------------- | |
| 1NOZY | 6046885 | |
| 1LRVYZ | 5500375 | |
| 402GUX | 4774205 | |
| 3VT0AX | 4014450 | |
| 39P29E | 3621020 | |
| 2TQFKV | 3075355 | |
| I98R2 | 1782350 | |
| 3XS45P | 1749605 |
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 render() { | |
| var pixels = get_pixels(); | |
| new Thread(function () { | |
| for (i = 0, len = pixels.length; i < len; i +=4) { | |
| // holy shared process memory batman! | |
| // manipulate pixels here | |
| } | |
| finished(); | |
| }); |
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
| .background-gradient(@start, @stop) { | |
| background-image:-moz-linear-gradient(top, @start, @stop); | |
| background-image:-o-linear-gradient(top, @start, @stop); | |
| background-image:-webkit-gradient(linear, lefttop, leftbottom, color-stop(0, @start), color-stop(1, @stop)); | |
| background-image:-webkit-linear-gradient(@start, @stop); | |
| background-image:linear-gradient(top, @start, @stop); | |
| filter: e("progid:DXImageTransform.Microsoft.gradient(startColorStr='") @start e("',EndColorStr='") @stop e("')"); | |
| } | |
| .transition(@element, @duration, @easing) { |
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
| uniqid = (-> | |
| id = 0 | |
| { get: -> id++ } | |
| )() | |
| uniqid.get() #= 0 | |
| uniqid.get() #= 1 | |
| uniqid.get() #= 2, and so on... |