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
| init: function() { | |
| this.control({ | |
| 'grid': { | |
| itemdblclick: this.editRow | |
| }, | |
| 'grid button[action=edit]': { | |
| 'click': function( element, event ) { | |
| var grid = element.findParentByType( 'grid' ); | |
| var record = grid.getSelectionModel().getSelection()[0]; | |
| if( typeof record !== 'undefined' ) { |
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
| formatMoney = (n) -> | |
| DecimalSeparator = Number(1.2).toLocaleString().substr(1,1) | |
| n.toLocaleString().split(DecimalSeparator)[0] + DecimalSeparator + n.toFixed(2).split('.')[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
| (function($){ | |
| $( document ).ready( function() { | |
| $( 'input[type=password]' ).each( function( k, e ) { | |
| var me = $( this ); | |
| if( typeof myId == 'undefined' ) | |
| var myId = me.attr( 'id' ); | |
| if( typeof myName == 'undefined' ) |
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 | |
| function generateRandomness( $fraction = 0.025 ) { | |
| return - ( log( 1.0 - (float) ( mt_rand() / ( mt_getrandmax() + 1 ) ) ) / $fraction ); | |
| } | |
| for( $x=0; $x<=10; $x++ ) { | |
| $rands = 100000; | |
| for( $i=0; $i<=$rands; $i++ ) | |
| $rand += generateRandomness( 1/40 ); |
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
| USERNAME="XXX" curl -s "https://api.github.com/users/${USERNAME}/repos" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}' |
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 | |
| function loadClasses($dir) { | |
| $d = new \DirectoryIterator($dir); | |
| while($d->valid()) { | |
| $f = $d->current(); | |
| if($f->getExtension() == 'php') { | |
| include $f->getPathname(); | |
| } elseif($f->isDir()&&!$f->isDot()) { | |
| loadClasses($f->getPathname()); |
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
| var filename = 'uri-to-css-file' | |
| var fileref = document.createElement("link") | |
| fileref.setAttribute("rel", "stylesheet") | |
| fileref.setAttribute("type", "text/css") | |
| fileref.setAttribute("href", filename) | |
| document.getElementsByTagName("head")[0].appendChild(fileref) |
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
| Math.random().toString(16).substring(2,15); |
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
| @mixin background-2x($background, $file: 'png'){ | |
| $image: #{$background+"."+$file}; | |
| $image2x: #{$background+"@2x."+$file}; | |
| background: url($image) no-repeat; | |
| @media (min--moz-device-pixel-ratio: 1.3), | |
| (-o-min-device-pixel-ratio: 2.6/2), | |
| (-webkit-min-device-pixel-ratio: 1.3), | |
| (min-device-pixel-ratio: 1.3), | |
| (min-resolution: 1.3dppx){ |
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
| // https://coderwall.com/p/m-uwvg | |
| background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISaeTr9P3wYrGjXqyC1krcKdhMpxEnt5JetoulscpyzhXN5FRpuPHvbeQaKxFAEB6EN+cYN6xD7RYGpXpNndMmZgM5Dcs3YSNFDHUo2LGfZuukSWyUYirJAdYbF3MfqEKmjM+I2EfhA94iG3L7uKrR+GdWD73ydlIB+6hgref1QTlmgmbM3/LeX5GI1Ux1RWpgxpLuZ2+I+IjzZ8wqE4nilvQdkUdfhzI5QDWy+kw5Wgg2pGpeEVeCCA7b85BO3F9DzxB3cdqvBzWcmzbyMiqhzuYqtHRVG2y4x+KOlnyqla8AoWW |
OlderNewer