Skip to content

Instantly share code, notes, and snippets.

Avatar

Jasim A Basheer jasim

View GitHub Profile
View Modern CSS Chopping - step1.jsx
var BetterBankingPage = React.createClass({
render: function() {
return (
<div className="BetterBankingPage">
<Header />
<AccountsList />
<Footer />
</div>
);
}
View MetaRefreshReactExample
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src="http://fb.me/JSXTransformer-0.12.1.js"></script>
<script type='text/javascript' src="http://fb.me/react-with-addons-0.12.1.js"></script>
</head>
<style type="text/css">
.CardsList-Card {
background-color: #ddeeaa;
View outcome-oriented-programming.md

Outcome-Oriented Programming

Mike McNeil, Aug 2014

Humans are not very good at planning. We have no problem running scenarios, thinking through possibilities, and pondering "what if?" questions. I might plan to not eat my cousin's birthday cake before she gets home, for instance. If I'm very serious, I might write down my commitment; or if I'm unsure about the pros and cons, use some organizational tool like a T-chart.

But when it comes to making a decision in the moment, all bets are off. The cake is a goner.

Predictive Analysis vs. Process Design

Below, I've included a figure containing a decision tree diagram.

View chrome-angular.js
var ngAppElem = angular.element(document.querySelector('[ng-app]') || document);
window.injector = ngAppElem.injector();
window.inject = injector.invoke;
window.$rootScope = ngAppElem.scope();
Object.defineProperty(window, '$scope', {
get: function () {
var elem = angular.element(console._commandLineAPI.$0);
return elem.isolateScope() || elem.scope();
@jasim
jasim / bungee.prg
Created Oct 25, 2013
Sweet pulldown menu DSL in SuperLib, a CA-Clipper library from 1996. http://www.the-oasis.net/ftpmaster.php3?content=ftplib.htm
View bungee.prg
bungstart()
bungoption("Files")
bungdrop()
bungoption("Open" ,{} ,{||!lFileIsOpen} )
bungoption("Close",{||nil},{||lFileIsOpen } )
bungundrop()
bungoption("Edit")
bungdrop()
bungoption("DBF" ,{||nil},nil )
bungoption("Ascii",{||nil},nil )
View physical_storage_volume.rb
class PhysicalStorageVolume
OS_VERSION = RbConfig::CONFIG['host_os']
def initialize(path)
@path = path
@path_exists = File.exists?(path)
end
def raise_error_if_file_doesnt_exist!
raise Errno::ENOENT.new(@path) unless @path_exists
View manycopies.md

manycopies init manycopies add volume /Volumes/My500GBPassport Rainmaker manycopies add volume /Volumes/OldSeagate80 Coconut manycopies add temporary volume / "MBP-Retina-temp"

manycopies ln "/Users/jasim/Pictures/Downloaded Albums/106517555286564995482" /Photos manycopies ln /Volumes/My500GBPassport/ManyCopies /

manycopies set sync /Photos /Documents Rainmaker manycopies set sync /Photos /Documents Coconut

@jasim
jasim / webrick genericserver demo.rb
Created May 14, 2013
Using WEBrick's GenericServer to talk over TCP without worrying about socket mechanics
View webrick genericserver demo.rb
# to test, run this file and `nc localhost 34242`, type a line and press enter
require 'webrick'
s = WEBrick::GenericServer.new(:Port => 34242)
trap("INT") { s.shutdown }
s.start do |sock|
begin
incoming=sock.readline
rescue EOFError => err
break
@jasim
jasim / method_missing_v1.rb
Created Sep 30, 2012
a simple example of method_missing and why you should use it with care
View method_missing_v1.rb
class Item
attr_reader :id
def initialize(id, properties)
@id = id
@properties = properties
end
def method_missing(m, *args, &block)
@properties[m]
@jasim
jasim / srshti_vim.md
Created Mar 29, 2012
Shortcuts for VimGet
View srshti_vim.md

#Basic Stuff#

##Movements##

  • Goto next word w
  • Goto previous word b
  • Select inner word viw
  • Select the inner block - vi{
  • Go to closing or opening tag - %