Skip to content

Instantly share code, notes, and snippets.

Jesse Crockett aojes

Block or report user

Report or block aojes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View coalesce-17.markdown

Coalesce 17

GPGPU particles using texture caches for position and velocity.

  • Click and drag to rotate.
  • Scroll wheel to zoom.
  • Right-click and drag to pan.

A Pen by Liam Egan on CodePen.

View package.json
{
"name": "StackPac",
"version": "0.1.0",
"license": "MIT",
"private": true,
"main": "src/index.js",
"repository": {
"type": "git",
"url": "gitlab.com:stack.pac/stackpac.git"
},
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@aojes
aojes / ChoicePoker.sol
Created Aug 4, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=true&gist=
View ChoicePoker.sol
pragma solidity ^0.4.24;
/* To Do
-- compare values of two cards
-- for matching against cards already drawn, just loop on random
-- match values in hand and assign uint handScore
-- betting
-- paying in/out
*/
View tinkering with martingale system
var hsh = {win: 0, lose: 0, balance: 1000, bet: 1, biggestBet: 0, odds: 0.66 }
for(i = 1; i <= 1000; i++) {
if(Math.random() <= hsh.odds) {
hsh.win++;
hsh.balance += hsh.bet * 1.5
hsh.bet = 1;
} else {
hsh.lose++;
hsh.balance -= hsh.bet;
View gist:04fa40e1c0b72900e93bdf600d9e6d05
Ethereum
0x723274498dff9d78622ef1978a11aafaccc41db2
View gist:373252
- form_for @demo, :html => { :multipart => true } do |f|
= f.error_messages
%p
= f.label :name
%br
= f.text_field :name
- f.fields_for :images do |builder|
%p
- if builder.object.new_record?
= builder.label :image, "Image"
View lark_template.rb
# download, from_repo, and commit_state methods swiped from
# http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
rescue
puts "Can't get #{from} - Internet down?"
View lark_template.rb
# download, from_repo, and commit_state methods swiped from
# http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
rescue
puts "Can't get #{from} - Internet down?"
You can’t perform that action at this time.