Skip to content

Instantly share code, notes, and snippets.

@cupuyc
cupuyc / DAO.sol
Last active January 20, 2017 10:15
DAO-contract-MainETH
/*
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@cupuyc
cupuyc / jquery.terminal-0.8.8_custom.js
Created August 17, 2016 12:59
Jquery terminal patched to have copy pasting working on Win/Mac FF/Chrome
/**@license
* __ _____ ________ __
* / // _ /__ __ _____ ___ __ _/__ ___/__ ___ ______ __ __ __ ___ / /
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 0.8.8
* http://terminal.jcubic.pl
*
* Licensed under GNU LGPL Version 3 license
@cupuyc
cupuyc / java8.sh
Last active February 27, 2021 18:46
Install Java8 Ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install maven
sudo apt-get install git
sudo apt-get install npm
sudo npm install -g bower
sudo ln -s /usr/bin/nodejs /usr/bin/node
@cupuyc
cupuyc / UIUtil.as
Created October 29, 2014 17:29
Camera rotation
/**
* Get camera rotation to keep video shown properly.
* Video object attached to the camera will only show upright video in a landscape-aspect orientation.
* For iOS default orientation is not landscape.
* For Android it varies.
*/
public static function getCameraRotation(camera : Camera) : int {
if (isLandscapeOrientation()) {
// camera is OK in landscape
return 0;
@cupuyc
cupuyc / facade.as
Created September 23, 2011 09:04
From scriptlib
Client.prototype.__resolve = function(ctype) {
// Check if a component class corresponding to ctype exists if so
// return a new facade factory for ctype components
if ( gFrameworkFC.components[ctype] != null ) {
info("Create new factory for type:" + ctype);
return this[ctype] = new FCFactory(this, ctype);
}
// else do nothing, forcing a NetConnection.Call.Failed
}
@cupuyc
cupuyc / gist:1213922
Created September 13, 2011 14:25
kickFms replacements
//fasade.asc
// First place that accept incoming RPC from client side.
// ---------------------------------------------------------------------------------
Client.prototype.__resolve = function(ctype) {
// Check if a component class corresponding to ctype exists if so
// return a new facade factory for ctype components
if ( gFrameworkFC.components[ctype] != null )
return this[ctype] = new FCFactory(this, ctype);
// else do nothing, forcing a NetConnection.Call.Failed