Skip to content

Instantly share code, notes, and snippets.

View skalnik's full-sized avatar
🐈

Mike Skalnik skalnik

🐈
View GitHub Profile
@skalnik
skalnik / andy.vim
Created April 5, 2012 03:26
<Leader>al to move down a line and insert delta of spaces
map <Leader>al :call MoveDownLine()<CR>
function! MoveDownLine()
let cols=col('.')
execute "normal! j"
let next_cols=col('.')
let delta_cols=cols-next_cols
if(delta_cols > 0)
if(next_cols==1)
let delta_cols += 1
@skalnik
skalnik / buzzLock.c
Created March 12, 2012 01:23
Buzz Lock
int buzz_lock(buzz_t lock) {
...
if(full_active_threads(lock)) {
add_to_waiting_threads(thread, lock);
do {
wait(lock);
if(is_gold(thread)) {
if(is_old(thread, lock)) {
class Bandcamp
attr_accessor :tags
#=> Defines:
def tags
@tags
end
def tags=(tags)
@tags = tags
end
@skalnik
skalnik / demo.rb
Created February 28, 2012 20:07
Rails Workshop 2
require 'tempfile'
class Demo
def initialize(&block)
instance_eval &block
end
def wait_for_enter
puts "Press enter to continue"
gets
\newcounter{ct}
\newcommand{\Rate}[1]{
\forloop{ct}{0}{\value{ct} < #1}{\filledlargestar }
\forloop{ct}{\value{ct}}{\value{ct} < 5}{\largestar }
}
@skalnik
skalnik / demo.rb
Created February 21, 2012 14:35
Rails Workshop
class Demo
def initialize(&block)
instance_eval &block
end
def wait_for_enter
puts "Press enter to continue"
gets
end

WTF is this REST thing?

  • REpresentational State Transfer
  • Introduced by Roy Fielding in 2000
  • Lets focus on APIs.
  • Lets talk about the Richardson Maturity Model

Credit: Martin Fowler

This should never be seen again!
[ 0.000000] Process ID:3899
[ 0.000000] Process has 10 threads
[ 0.000000] /proc/lfprng was accessed!
[ 0.000000] Process ID:3899
[ 0.000000] Process has 10 threads
[ 0.000000] /proc/lfprng was accessed!
[ 0.000000] Process ID:3899
[ 0.000000] Process has 10 threads
[ 0.000000] /proc/lfprng was accessed!
[ 0.000000] Process ID:3899