Skip to content

Instantly share code, notes, and snippets.


Clark Nelson clarknelson

Block or report user

Report or block clarknelson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6789140
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int charpos(const char character, const char *char_set)
int counter;
int length = strlen(char_set);
for (counter = 0; counter<length; counter++){
if (char_set[counter] == character){
View gist:6786511
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *interpret_set(const char *input_set)
int counter;
int length = strlen(input_set);
char output[100];
for(counter = 0; counter<length; counter++){
View gist:5986972
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== CreateProducts: migrating =================================================
-- create_table(:products)
rake aborted!
An error has occurred, this and all later migrations canceled:
View index.html
<div class="container">
<div class="slide one"></div>
<div class="slide two"></div>
<div class="slide three"></div>
<div class="slide four"></div>
View gist:8a5beb9b1f1fa29d29b3
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Bootstrap ROCKS!</title>
<link rel="stylesheet" href="">
View gist:9e6004874fb0fe12322f
var top = $(window).scrollTop();
var offset = 130;
var trigger = top+offset;
var elements = $('h1, h2, li');
checkElements(trigger, elements);
View gist:d6e85a16a35db142002b
9 class DiceSet
10 :attr_accessor :values
11 def roll(set)
12 @values = set
13 end
14 end
View gist:4c8ec378513356fb82a9
def test_hash_is_unordered
hash1 = { :one => "uno", :two => "dos" }
hash2 = { :two => "dos", :one => "uno" }
assert_equal false, hash1 == hash2
View gist:1ee58d6fb03e20763d40
36 in_ruby_version("mri") do
37 RubyConstant = "What is the sound of one hand clapping?"
38 def test_constants_become_symbols
39 all_symbols_as_strings = { |x| x.to_s }
41 assert_equal false, all_symbols_as_strings.include?(RubyConstant)
42 end
43 end
You can’t perform that action at this time.