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 MyClass(x) { | |
| this.value = x; | |
| } | |
| MyClass.prototype = { | |
| 'print': function() { print(this.value); } | |
| }; | |
| var o = new MyClass("hello world"); | |
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 my_global = {}; | |
| var importer = new Importer(my_global); | |
| assert(importer.container === my_global); | |
| importer.load('XML') | |
| var doc = my_global.XML.Document(); | |
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
| Foo = { | |
| // ... | |
| } | |
| this.load = 2 |
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 headers(str) { | |
| var lst = str.split("\n"); | |
| var hdr = {}; | |
| hdr.__proto__ = null; | |
| lst.forEach(function (x) { | |
| if (!x.length) | |
| return; | |
| [ name, value ] = x.split(/\s*:\s*/, 2); | |
| if (!hdr[name]) | |
| hdr[name] = value; |
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
| template<size_t (curl::*Method)(void *, size_t, size_t, void *)> | |
| static size_t curl::c_handle_curl(void *ptr, size_t size, size_t nmemb, void *stream) { | |
| curl *self = static_cast<curl*>(ptr); | |
| return (self->*Method)(ptr, size, nmemb, stream); | |
| } | |
| foo ( &curl::c_handle_curl<&curl::method_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
| suite_name = 'The big test suite' | |
| test_foo = function() { | |
| expect(2); | |
| ok(1, "Check ok"); | |
| same([1,2],[3,2], "Arrays are the same"); | |
| } | |
| /* | |
| [execute in scope (new TestSuite)] |
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
| // checks if `c' is a space or a h-tab (see RFC 2616 chapter 2.2) | |
| inline bool isspht(char c) { | |
| return c == ' ' || c == '\t'; | |
| } | |
| template<class Source, typename Char> | |
| bool expect(Source &in, Char c) { | |
| int t = boost::iostreams::get(in); | |
| if(t == c) | |
| return true; |
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
| boost::any environment::enumerate_start(int &n) { | |
| n = 0; // We dont know how many | |
| return boost::any(environ); | |
| } | |
| value environment::enumerate_next(boost::any &iter) { | |
| char **env = boost::any_cast<char**>(iter); | |
| if (*env == 0) | |
| return value(); |
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
| bin/ | |
| jsrepl | |
| lib/ | |
| libflusspferd.so | |
| libflusspferd-xml.so | |
| flusspferd/ | |
| prelude.js | |
| plugins/ | |
| libxml.so -> ../../libflusspferd-xml.so | |
| libcurl.so |
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
| #!/bin/bash | |
| cd /var/git/flusspferd.git | |
| git remote update | |
| git for-each-ref --format="%(refname)" refs/remotes/|while read ref | |
| do | |
| branch=$(echo $ref|sed -e 's/^refs\/remotes\/[^\/]*\//refs\/heads\//') | |
| echo "$ref => $branch" | |
| git push . $ref:$branch |
OlderNewer