Skip to content

Instantly share code, notes, and snippets.

😃
happy 😀

Manfred Touron moul

😃
happy 😀
Block or report user

Report or block moul

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mt_adaptor.c.patch
--- src/c/src/mt_adaptor.c 2014-10-30 13:40:02.000000000 +0100
+++ src/c/src/mt_adaptor.c 2014-10-30 13:40:58.000000000 +0100
@@ -483,25 +483,9 @@
int32_t fetch_and_add(volatile int32_t* operand, int incr)
{
#ifndef WIN32
- int32_t result;
- asm __volatile__(
- "lock xaddl %0,%1\n"
- : "=r"(result), "=m"(*(int *)operand)
@moul
moul / node-spawn-stdio.js
Last active Aug 29, 2015
node-spawn-stdio.js
View node-spawn-stdio.js
process.stdout.isTTY;
require('child_process').spawn('ssh', 'localhost -t -- bash'.split(' '), {stdio: 'inherit'});
@moul
moul / boot-1.txt
Last active Aug 29, 2015
c1-bitrig.txt
View boot-1.txt
��l�High speed PHY - Ver 2.0.0 (COM-PHY-V20)
DDR3 Training Sequence - Ver 4.0.0
DDR3 Training Sequence - Ended Successfully
Status = MV_OK
BootROM: Image checksum verification PASSED
U-Boot 2011.12 (Mar 23 2015 - 16:06:25) Marvell version: 2012_Q4.0p16
Board: RD-AXP-CUSTOMER
@JogoShugh
JogoShugh / AsyncAwait.js
Last active Aug 29, 2015
SpaceMiner gitlab API
View AsyncAwait.js
// npm install -g babel
// Then run with babel-node like this:
// babel-node --stage 2 index.js
import gitlab from 'gitlab';
import request from 'request';
import Promise from 'bluebird';
let apiBaseUrl = 'http://v1cs-gitlab-dev.cloudapp.net';
request.post = Promise.promisify(request.post, request);
@paulirish
paulirish / gist:616412
Created Oct 8, 2010
"iframe" sitedown fallback via <object>
View gist:616412
<!-- 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/
-->
View gist:1369931
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`
View dabblet.css
/**
* Kit-Cat Clock
*/
body {
/*margin: 200px;*/
}
#wrapper,
#clock,
#wrapper2,
@henrik
henrik / examples.coffee
Created Feb 12, 2012
Animate number changes step by step (e.g. "1.1" -> "1.2" -> "1.3") with CoffeeScript and jQuery. And some other methods around number formatting.
View examples.coffee
# Examples
console.log NumberWrangler.format(123456.78)
console.log NumberWrangler.format("1234")
console.log NumberWrangler.formatDecimalComma("123456.78")
console.log NumberWrangler.parse("123,4 56.78")
console.log NumberWrangler.parseDecimalComma("123.4 56,78")
console.log NumberWrangler.countDecimals(1.2345)
# Requires jQuery:
@moul
moul / cdiscount.com
Created Mar 27, 2012
Personalized Web Options
View cdiscount.com
[{"name":"Standard AdBlocker","urlRegex":"^http://","urlExcludeRegex":"","enabled":false,"preserveDocWrite":false,"css":"","html":"","js":"","filters":[{"tags":"div,table","attribute":"id,class","value":"","valueRegex":"([-_]|\\b)(MarketGid(Composite)?\\d+|(adv?|ban(ner)?)\\d+x\\d+|y\\d+_direct\\d+)([-_]|\\b)"},{"tags":"div,table","attribute":"id,class","value":"","valueRegex":"^(top|left|right|bottom)[-_]?(ad|ban(n?er)?)s?\\d*(x\\d+)?$"},{"tags":"div,table","attribute":"id,class","value":"","valueRegex":"([-_]|\\b)(adv?|ban(n?er)?)[-_]?\\d+x\\d+[-_]?[a-z]*([-_]|\\b)"},{"tags":"div,table","attribute":"id,class","value":"","valueRegex":"([-_]|\\b)(bann?er|reklama|advertisement)s?[-_]?\\d*(x\\d+)?([-_]|\\b)"},{"tags":"div,table","attribute":"id,class","value":"","valueRegex":"([-_]|\\b)sidebar[-_]?ads?([-_]|\\b)"},{"tags":"","attribute":"id,class","value":"begun_table,baner,banner,ad,adv,reklama,google_companion_ad_div,google_ads_site,Advertisement,adBar,adBox","valueRegex":""},{"tags":"div","attribute":"id","v
anonymous
anonymous / Download image + resize it - Node.js
Created Dec 25, 2012
Using a request stream and directly send the image to graphicsmagick
View Download image + resize it - Node.js
var request = require('request');
var fs = require('fs');
var gm = require('gm');
gm(request('http://image.blingee.com/images18/content/output/000/000/000/6d0/652887372_1455186.gif'), 'brabra.png')
.resize(240, 240)
.write('doodle2.png', function (err) {
if (!err) console.log('done');
console.log(err);
You can’t perform that action at this time.