Skip to content

Instantly share code, notes, and snippets.

@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..."
@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

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 / Gemfile
Last active August 29, 2015 14:08 — forked from hryk/Gemfile
source "https://rubygems.org/"
gem "neo4j"
gem "pry"
gem "minitest"
gem "jbundler"
@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 / 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)>'
attr_accessor :controllerDelegate
def initWithFrame(frame, andDelegate: delegate)
self.initWithFrame(frame)
@controllerDelegate = delegate
setupFrownImage
setupSorryLabel
setupButton
self
end
@tissak
tissak / mountain-lion-brew-setup.markdown
Created June 17, 2012 02:06 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@tissak
tissak / package.json
Created December 28, 2011 03:41
Haml support in Spine without hacking spine
{
"name": "app",
"version": "0.0.1",
"dependencies": {
"serveup": "~0.0.2",
"hem": "~0.1.6",
"es5-shimify": "~0.0.1",
"json2ify": "~0.0.1",
"jqueryify": "~0.0.1",
"spine": "~1.0.5",
ipv.classUtil.newManager = function(managerName, subjectClass){
var manager = dojo.getObject(managerName);
if(typeof(manager) == "undefined"){
manager = new function(){
this._widget = null;
this.getWidget = function(options){
options = dojo.mixin({}, options);
if (!this._widget) {
this._widget = new subjectClass();
}