Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.19/fabric.min.js"></script>
<script src="http://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
<style id="jsbin-css">
html {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.19/fabric.min.js"></script>
<script src="http://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
<style id="jsbin-css">
html {
@iongion
iongion / 0_reuse_code.js
Created August 5, 2016 16:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// entry point
// node
// vendors
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
// project
@iongion
iongion / add_organization_membership.sql
Created October 8, 2015 07:23
organization capacity
-- Function: add_organization_membership(integer, integer, boolean)
-- DROP FUNCTION add_organization_membership(integer, integer, boolean);
CREATE OR REPLACE FUNCTION add_organization_membership(
_organization_id integer,
_user_id integer,
_is_mananger boolean)
RETURNS boolean AS
$BODY$
@iongion
iongion / index.html
Last active August 29, 2015 14:20
ionel munteanu
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css">
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
<label t="translate(0,346)">
@iongion
iongion / gist:f23edaa708eafc240a8b
Created December 5, 2014 10:15
phantom-qunit-junit-runner.js
/**
* XMLWriter - XML generator for Javascript, based on .NET's XMLTextWriter.
* Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
* Date: 3/12/2008
* @version 1.0.0
* @author Ariel Flesler
* http://flesler.blogspot.com/2008/03/xmlwriter-for-javascript.html
*/
# Usage: ruby doctor.rb [HOST=status.github.com[:PORT=443]]
require 'rbconfig'
require 'net/https'
if ARGV[0] =~ /^[^-]/
host, port = ARGV[0].split(':', 2)
else
host = 'status.github.com'
end
port ||= 443
build php from source x86_64-unknown-cygwin
./configure --prefix=/opt/php/5.5.12 --with-config-file-path=/opt/php/5.5.12/etc --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --with-gd --with-t1lib --enable-gd-native-ttf --with-gettext --with-gmp --with-mhash --with-iconv --with-imap --with-imap-ssl --enable-intl --enable-mbstring --with-libmbfl --with-onig --with-mcrypt --with-mysql --with-mysqli --enable-embedded-mysqli --enable-pcntl --enable-opcache --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-pspell --with-libedit --with-readline --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip --with-pear --enable-mysqlnd
@iongion
iongion / gist:9229105
Created February 26, 2014 13:01
Shell execution with chain support, break on error, break if invoked command does not exist, print error message in red :P
def shell(*cmds)
output = ""
cmds.each do |cmd|
begin
stop = false
stdout_str, stderr_str, status = Open3.capture3(cmd)
output = "#{output}#{stdout_str}#{stderr_str}"
if status.success?
context = "#{cmd}\n#{stdout_str}"
else