This file contains 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
// Alternative JavaScript Syntax | |
Person = :(name, address) { @name!, @address! } | |
Person::inspect = :{ <: "{@name} lives at {@address}" } | |
tj := Person('TJ', '314 Bessborough ave') | |
bob := Person('Bob', 'Some place') | |
[tj, bob].each(:(person){ print(person.inspect()) }) |
This file contains 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 file contains 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
.mouse, #preview{ | |
position: absolute; | |
background-repeat: no-repeat; | |
height: 22px; | |
min-width: 15px; | |
z-index: 100; | |
} | |
.mouse{ | |
background-image: url('../images/cursor.png'); |
This file contains 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
<!-- so it turns out that the object tag can act like an iframe | |
but the cool thing is you can nest object tags inside eachother for a fallback path. | |
what this means is you can "objectframe" a site.. and if it fails.. (site down, offline, whatever).. it'll use the next one. | |
so you can objectframe the live site and fallback to a screenshot. | |
or something. | |
demo at : http://jsfiddle.net/paul/CY2FQ/1/ | |
--> |
This file contains 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
I turned this gist into a "real" repository. It is here: http://github.com/pete/cats . | |
Here, placed side-by-side for comparison, are GNU's implementation of | |
cat, Plan 9's implementation, Busybox's implementation, and NetBSD's | |
implementation, Seventh Edition Unix (1979), and 4.3BSD. | |
For good measure (and because I suppose I am now committed to collecting | |
cats) also included are Second Edition Unix (in assembly) and Inferno's | |
implementation (in Limbo) for good measure. |
This file contains 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
repr = (o, depth=0, max=2) -> | |
if depth > max | |
'<..>' | |
else | |
switch typeof o | |
when 'string' then "\"#{o.replace /"/g, '\\"'}\"" | |
when 'function' then 'function' | |
when 'object' | |
if o is null then 'null' | |
if _.isArray o |
This file contains 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
// Originally solved by Tim Branyen in his drop file plugin | |
// http://dev.aboutnerd.com/jQuery.dropFile/jquery.dropFile.js | |
jQuery.event.props.push('dataTransfer'); |
This file contains 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
cd /path/to/platform/sites/domain.name | |
drush sql-query "SHOW TABLES" | tail -n +2 | xargs -I '{}' echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql | |
perl -p -i -e 's/(search_[a-z_]+ ENGINE=)INNODB/\1MYISAM/g' alter_table.sql | |
cat alter_table.sql | `drush sql-connect` |
This file contains 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
$(document).ready(function() { | |
// Support for AJAX loaded modal window. | |
// Focuses on first input textbox after it loads the window. | |
$('[data-toggle="modal"]').click(function(e) { | |
e.preventDefault(); | |
var url = $(this).attr('href'); | |
if (url.indexOf('#') == 0) { | |
$(url).modal('open'); | |
} else { |
This file contains 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
/** | |
* Kit-Cat Clock | |
*/ | |
body { | |
/*margin: 200px;*/ | |
} | |
#wrapper, | |
#clock, | |
#wrapper2, |
OlderNewer