Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am occ on github.
  • I am occ (https://keybase.io/occ) on keybase.
  • I have a public key whose fingerprint is 17E7 AD2E 6284 50BE 0573 7116 A9A2 0C74 7B65 6366

To claim this, I am signing this object:

@occ
occ / Main.scala
Created August 6, 2015 17:45
Dirty simulation to Monty Hall Problem
package me.occ.dealornodeal
import scala.util.Random
object Main extends App {
val rng = new Random()
def runTrial(changeMind: Boolean, showOutput: Boolean = false): Boolean = {
val prize = rng.nextInt(3)
var options = Seq.range(0, 3).map(_ == prize).zipWithIndex
import java.util.ArrayList;
import java.util.Collections;
/**
* Created by melisa on 26.03.14.
*/
public class p18 {
public static void main(String[] args) {
@occ
occ / shieldjs
Last active December 11, 2015 10:39
var ShieldJS = function(options) {
// Private variables
var alphabetically,
ordered,
var1,
var2;
// Construtor
function constructor(o) {
// Process options, etc.
@occ
occ / gist:3953748
Created October 25, 2012 16:15
NEST on Mono 3.0
at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (System.Threading.WaitHandle,intptr,int,bool) <0x00067>
at System.Threading.WaitHandle.WaitOne (int,bool) <0x000a8>
at System.Threading.ManualResetEventSlim.Wait (int,System.Threading.CancellationToken) <0x001cc>
at System.Threading.Tasks.Task.Wait (int,System.Threading.CancellationToken) <0x00162>
at System.Threading.Tasks.Task.Wait () <0x0002e>
at System.Threading.Tasks.Task`1<Nest.ConnectionStatus>.get_Result () <0x00029>
at Nest.Connection.DoAsyncRequest (System.Net.HttpWebRequest,string) <0x0009b>
at Nest.Connection.DoSynchronousRequest (System.Net.HttpWebRequest,string) <0x00047>
at Nest.Connection.BodyRequest (string,string,string) <0x00033>
at Nest.Connection.PutSync (string,string) <0x00023>
@occ
occ / cloud-set-guest-password
Created August 13, 2012 21:43
Updated cloud-set-guest-password for ubuntu
#!/bin/bash
#
# Init file for Password Download Client
#
# chkconfig: 345 98 02
# description: Password Download Client
# Modify this line to specify the user (default is root)
user=root