Skip to content

Instantly share code, notes, and snippets.

@tissak
tissak / crashblock.sh
Created February 10, 2013 23:48
Demonstrating working and non working module change code in rubymotion. Code was verified on rake console.
(main)> z.q
Assertion failed: (b != NULL), function rb_vm_block_method_imp, file vm.cpp, line 3000.
*** simulator session ended with error: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The simulated application quit." UserInfo=0x100461550 {NSLocalizedDescription=The simulated application quit., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
rake aborted!
Command failed with status (1): [DYLD_FRAMEWORK_PATH="/Applications/Xcode.a...]
/Library/RubyMotion/lib/motion/project.rb:101:in `block in <top (required)>'
@tissak
tissak / 0_reuse_code.js
Created January 20, 2014 02:20
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
@tissak
tissak / Gemfile
Last active August 29, 2015 14:08 — forked from hryk/Gemfile
source "https://rubygems.org/"
gem "neo4j"
gem "pry"
gem "minitest"
gem "jbundler"

Keybase proof

I hereby claim:

  • I am tissak on github.
  • I am tissak (https://keybase.io/tissak) on keybase.
  • I have a public key whose fingerprint is A5E6 A815 4EE3 D38E 5908 ADCE 5DD0 2FDB B0F9 3E7D

To claim this, I am signing this object:

@tissak
tissak / SHA1.rb
Last active August 29, 2015 14:17 — forked from reprah/SHA1.rb
#!/usr/bin/ruby
require 'rubygems'
require 'active_support/all'
require 'digest/sha1'
def leftrotate(value, shift)
return ( ((value << shift) | (value >> (32 - shift))) & 0xffffffff)
end
# FIPS 180-2 -- relevant section #'s below
@tissak
tissak / runpod_start.sh
Last active August 17, 2023 14:36
runpod_start.sh
#!/bin/bash
set -e # Exit the script if any statement returns a non-true return value
# ---------------------------------------------------------------------------- #
# Function Definitions #
# ---------------------------------------------------------------------------- #
# Start nginx service
start_nginx() {
echo "Starting Nginx service..."