Skip to content

Instantly share code, notes, and snippets.

View cheeyeo's full-sized avatar
💭
Researching on use of transformers in computer vision

Chee Yeo cheeyeo

💭
Researching on use of transformers in computer vision
View GitHub Profile
@cheeyeo
cheeyeo / sse.go
Created July 4, 2014 20:59 — forked from ismasan/sse.go
package main
import (
"fmt"
"log"
"net/http"
"time"
)
// Example SSE server in Golang.
require 'fog'
username = 'testuser'
bucket = 'uniquebucketname1234'
aws_credentials = {
:aws_access_key_id => 'YOUR-ACCESS-KEY-ID',
:aws_secret_access_key => 'YOUR-SECRET-ACCESS-KEY'
}
@cheeyeo
cheeyeo / sse.go
Created June 24, 2014 19:47 — forked from ismasan/sse.go
package main
import (
"fmt"
"log"
"net/http"
"time"
)
// Example SSE server in Golang.
class AnonymousUser < User
attr_accessible *ACCESSIBLE_ATTRS, :type, :token, as: :registrant
def register(params)
params = params.merge(type: 'User', token: nil)
self.update_attributes(params, as: :registrant)
end
end
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
require 'csv'
def memstats
size = `ps -o size= #{$$}`.strip.to_i
end
memstats #4900
CSV.open('visitors.csv', headers: true) do |csv|
visitors = csv.each # Enumerator
memstats # 5164
@cheeyeo
cheeyeo / endian.m
Created April 28, 2014 19:34 — forked from markd2/endian.m
#import <Foundation/Foundation.h>
// Xcode_3_2_6/usr/bin/gcc -arch ppc -std=c99 -isysroot /Xcode_3_2_6/SDKs/MacOSX10.5.sdk -g -Wall -framework Foundation -o endian-ppc ~/Downloads/endian.m (thanks to Jeremy W. Sherman for the assist)
// clang -arch x86_64 -g -Weverything -framework Foundation -o endian endian.m
int main (void) {
unsigned int values[] = { 1, 387, 8533937 };
<table>
<thead>
<tr>
<th>Name</th>
<th>Email></th>
<th>Country</th>
<th></th>
</tr>
</thead>
# Get the 1.0.1 version of SSL
brew install openssl
./configure --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl
touch lib/wx/SKIP lib/odbc/SKIP
make -j4
sudo make install
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key