Skip to content

Instantly share code, notes, and snippets.

View moul's full-sized avatar
🌸
societal evolution engineer

Manfred Touron moul

🌸
societal evolution engineer
View GitHub Profile
// 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()) })
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 7, 2024 01:38
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
@paulirish
paulirish / gist:616412
Created October 8, 2010 05:38
"iframe" sitedown fallback via <object>
<!-- 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/
-->
@pete
pete / 0-README
Last active February 10, 2024 07:12
Various implementations of the 'cat' command, for comparison.
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.
@jacob414
jacob414 / repr.coffee
Created December 9, 2010 11:17
Quick and dirty Javascript repr() function using CoffeeScript
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
// Originally solved by Tim Branyen in his drop file plugin
// http://dev.aboutnerd.com/jQuery.dropFile/jquery.dropFile.js
jQuery.event.props.push('dataTransfer');
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`
@drewjoh
drewjoh / custom.js
Created January 27, 2012 13:55
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(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 {
@itsjustkarissa
itsjustkarissa / dabblet.css
Created February 9, 2012 15:17
Kit-Cat Clock
/**
* Kit-Cat Clock
*/
body {
/*margin: 200px;*/
}
#wrapper,
#clock,
#wrapper2,