Skip to content

Instantly share code, notes, and snippets.

Nicholas Clark NickClark

  • 59937
Block or report user

Report or block NickClark

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
NickClark / index.html
Created Aug 4, 2017
Type issue in nw.js
View index.html
<!DOCTYPE html>
<html lang="en">
chrome.extension.getBackgroundPage().Function === Function
NickClark / thoughts.markdown
Last active Sep 11, 2018
Elm vs TypeScript Thoughts
View thoughts.markdown

Elm and TypeScript

  • Elm Task - An Elm specific implementation of Observables (more limited?)
  • TS and Elm - Once it compiles it usually runs (Provided you're following the warnings provided in either the compiler output (better) or editor (best) )
  • Editor and tooling support?
  • TS and Elm - Typed Langs
  • Most suitable for complete apps, not just a JS compiler
  • Enforces Reactive programming - Angular 2 (Observables) provides the same thing, just not forced.
  • Know TS, know JS. Able to contribute back to the community easier.
  • Object assignment kinda weird: { point | x = 42 } Reason? (overall weird sytnax)
View gist:1aa355aec9f96d4fbb09
# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 8.4G 8.3G 0 100% /
none 4.1k 0 4.1k 0% /sys/fs/cgroup
udev 4.0G 13k 4.0G 1% /dev
tmpfs 785M 422k 784M 1% /run
none 5.3M 0 5.3M 0% /run/lock
none 4.0G 0 4.0G 0% /run/shm
none 105M 0 105M 0% /run/user
/dev/xvdb 32G 12G 19G 40% /mnt
View gist:7266959
puts 'Hello there, and what\'s your name?'
name = gets
pp name
name = name.chomp
pp name
puts 'Your name is ' + name + '? What a lovely name!'
puts 'Pleased to meet you, ' + name + '. :)'
View a.markdown

==Why am I getting the warnings?==

NickClark / a.markdown
Created Apr 22, 2012
Windows Compilation
View a.markdown

I have a lib I am trying to link against at:


It can find the header file at:


I have this working on my Mac, but I need to now get it working on windows.

NickClark / sdk.rb
Created Mar 28, 2012
Trouble with ffi and multi arch lib
View sdk.rb
#console output
$ ruby lib/hitt/sdk.rb
/Users/nick/.rvm/gems/ruby-1.9.3-p0-perf/gems/ffi-1.0.12.rc1/lib/ffi/library.rb:121:in `block in ffi_lib': Could not open library 'lib/ext/': dlopen(lib/ext/, 5): no suitable image found. Did find: (LoadError)
lib/ext/ unknown file type, first eight bytes: 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A
from /Users/nick/.rvm/gems/ruby-1.9.3-p0-perf/gems/ffi-1.0.12.rc1/lib/ffi/library.rb:88:in `map'
from /Users/nick/.rvm/gems/ruby-1.9.3-p0-perf/gems/ffi-1.0.12.rc1/lib/ffi/library.rb:88:in `ffi_lib'
from lib/hitt/sdk.rb:5:in `<module:Sdk>'
from lib/hitt/sdk.rb:3:in `<main>'
NickClark / toggle_field_on_select_value.js
Created Jun 14, 2011
How do you create a jquery plugin that needs to keep state?
View toggle_field_on_select_value.js
$.fn.toggle_field_on_select_value = function(select_input, value) {
toggle = function (){
$select = $(select_input);
$this = $(this);
if($select.attr("value") == value){
NickClark / Error
Created May 13, 2011
Deployment Gemfile.lock woes
View Error
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* guard-pow
* rb-fsevent
NickClark / explain.markdown
Created May 4, 2011
Error using launchy with cucumber and spork.
View explain.markdown


This error occurs when I run this feature with spork. If I run it without spork, then it works as expected.

You can’t perform that action at this time.