Skip to content

Instantly share code, notes, and snippets.

/*
* Template Name: Orbit - Responsive Resume/CV Template for Developers
* Version: 1.0
* Author: Xiaoying Riley
* Twitter: @3rdwave_themes
* License: Creative Commons Attribution 3.0 License
* Website: http://themes.3rdwavemedia.com/
*/
/* styles-4.css */
/* ======= Base ======= */
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
var hideSmall = false;
var hideSmallAmountInterval;
$(function() {
$('.chat-button').before('<li class="hideSmallNav">Hide small amount <input type="text" value="0.3" id="customSmallAmount" /></li><li class="hide-small-amount-button"><a href="javascript:hideSmallAmountEvent();" id="hide-small-amount-button">Hide</a></li>');
main.EtherDelta.refreshInterval = 1000;
displayGasPrice();
});
function hideSmallAmount() {
@dennym
dennym / enum.ex
Last active February 24, 2017 17:18
code = ""
files = FileExt.ls_r(path)
code = code <> " " <> Enum.each files, fn(file) ->
File.read! file
|> join_code
|> String.codepoints
end
Logger.info(code) #=> is empty since code got assigned inside of Enum.each. Its supposed to be all strings that are read from the files merged together.
fixed_properties = {event_id: x, something: 'blub'}
clean_fixed_properties = fixed_properties
clean_fixed_properties.keys.each do |key|
clean_fixed_properties.delete(key) unless relation_klass.column_names.include?(key)
end
Verifying that +denym_ is my blockchain ID. https://onename.com/denym_
@dennym
dennym / prawn_grid.rb
Created December 29, 2015 15:14
Prawn.rb Grid
Prawn::Document.generate(prawn_file) do
y = 790
79.times do
x = -30
58.times do
bounding_box([x,y], :width => 10, :height => 10) do
stroke_color '000000'
stroke_bounds
text_box "#{x}", :size => 5, :at=> [0,10], :width => 10, :height => 10, color: 'ff0000' if y == 790
text_box "#{y}", :size => 5, :at=> [0,10], :width => 10, :height => 10, color: 'ff0000' if x == -30
@dennym
dennym / acceptance_spec_helper.rb
Created October 15, 2015 10:07 — forked from phoet/acceptance_spec_helper.rb
don't put all your stuff in /spec
require 'simplecov'
SimpleCov.command_name "acceptance"
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rails'
require 'capybara/poltergeist'
@dennym
dennym / spec.rb
Last active August 29, 2015 14:02
context 'something went wrong' do
it 'raises an exception and returns 422 Unprocessable Entity' do
@klass = controller.send(:base_class)
allow(@klass).to receive(:recover!).with(@organization.id).and_raise(::Extension::ActiveRecord::Paranoia::RecordNotRestored)
put :restore, format: :json, id: @organization.id
expect(response.status).to eq(422)
end
end
params[:url]="http:google.com+42min"
expire = params[:url].gsub!(/\+(\d+)min/) #=> <MatchData "+42min" 1:"42">