This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modified from http://redotheweb.com/2013/05/15/client-side-full-text-search-in-css.html | |
// you'll need to add type='text/css' to the style tag in the HTML for this to work in IE<9 | |
(function() { | |
var addslashes = function(str) { | |
return (str + '') | |
.replace(/[\\"']/g, '\\$&') | |
.replace(/\u0000/g, '\\0'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: linduxed <[email protected]> | |
pkgname=exercism-cli | |
pkgver=v1.9.2 | |
pkgrel=1 | |
pkgdesc="Command line client for exercism.io" | |
arch=("i686" "x86_64") | |
url="https://github.com/exercism/cli" | |
license=("MIT") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
didIClick: 'No Clicks!', | |
actions: { | |
otherAction(){ | |
alert('controller action'); | |
return true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
alertDisabled: Ember.observer('checked', function() { | |
var disabled = Ember.$('#link').hasClass('disabled'); | |
console.log(`link disabled: ${disabled}`); | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmailWorkerProxy | |
include WorkerProxy | |
sidekiq_options queue: 'email', retry: false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module KClass | |
def self.[](*keywords) | |
klass = Class.new | |
klass.send(:define_method, :initialize) do |hash| | |
keywords.each do |kw| | |
instance_variable_set("@#{kw}", hash[kw]) | |
end | |
end | |
keywords.each do |kw| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Distributions | |
function estimate_pi(n) # the higher n is, the more accurate the estimate will be | |
hits = 0 | |
for i=1:n | |
x = rand(Uniform(-1,1)) | |
y = rand(Uniform(-1,1)) | |
if x*x + y*y <= 1 | |
hits += 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rails' # use correct rails version |