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
<script type="text/javascript"> | |
// Extend original Billing class and overwrite newAddress method | |
var BillingCustom = new Class.create(Billing, { | |
//$super represents the original function | |
newAddress: function($super, isNew) { | |
$super(isNew); // call original function. You don't have to call the original function you may or may not want to. You might just copy the original function and adapt it. | |
// Do something else here after calling the original function | |
} |
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
proc tc(a:int): proc = | |
return proc (b:int): int = | |
return a + b | |
var x: proc = tc(1) | |
echo x(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
import tables, hashes | |
echo "Not ordered table" | |
var t = {"key1": "value1", "key2":"computer blue", "key3": "value2"}.newTable | |
t.add("blue", "b") | |
echo t["blue"] |
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
cd | |
mkdir bin | |
export PATH=$PATH:$HOME/bin | |
git clone git://github.com/Araq/Nim.git | |
cd Nim | |
git clone --depth 1 git://github.com/nim-lang/csources | |
cd csources && sh build.sh | |
cd .. | |
bin/nim c koch | |
./koch boot -d:release |
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
// Eslint npm install eslint-plugin-babel -D && ln -s node_modules/eslint/bin/eslint.js eslint | |
// Also the dependency for .vimrc | |
/* | |
let g:syntastic_javascript_checkers = ['eslint'] | |
" Override eslint with local version where necessary. | |
let local_eslint = finddir('node_modules', '.;') . '/.bin/eslint' | |
if matchstr(local_eslint, "^\/\\w") == '' | |
let local_eslint = getcwd() . "/" . local_eslint | |
endif |
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
-- name: get_cools | |
SELECT * | |
FROM cools | |
-- name: insert_a_cool | |
INSERT INTO cools | |
(name, why) | |
VALUES | |
(?, ?) | |
RETURNING level |
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 b = []; | |
var f; | |
var s = document.createElement('script'); | |
s.src = 'https://code.jquery.com/jquery-1.11.1.min.js'; | |
s.onload = function() { | |
var ifr = window.jQuery('.iframe-container.main iframe')[0]; | |
f = new F(ifr.contentWindow, ifr.contentDocument, ifr.contentWindow.jQuery, ifr.contentWindow.EasyEdit, ifr.contentWindow.EasyEdit.wizard); | |
}; | |
document.body.appendChild(s); | |
var F = function(window, document, $, EasyEdit, wizard) { |
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
local function loader(file) | |
local f = io.open(file, "rb") | |
assert(f, "file not found") | |
local c = f:read("*all") | |
f:close() | |
return c | |
end | |
local function sqlType(params, sql) | |
return {params = params, sql = sql} |
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
--[[ | |
LUA variant of the php unserialize function | |
Port of http://phpjs.org/functions/unserialize | |
]]-- | |
local function unserialize (data) | |
local function utf8Overhead (chr) | |
local code = chr:byte() | |
if (code < 0x0080) then | |
return 0 |
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
asset_type: Container Template | |
asset_name: Accordion | |
asset_parent_name: Configuration/Container Templates | |
content_files_dir: content_files/container_templates/accordion/ | |
auth_layout: auth_layout.html | |
auth_js: auth.js | |
auth_css: auth.css | |
frontend_layout: frontend_layut.html | |
frontend_js: frontend.js | |
frontend_css: frontend.css |
OlderNewer