Skip to content

Instantly share code, notes, and snippets.

View unders's full-sized avatar

Anders Törnqvist unders

  • Functionbox
  • Göteborg, Sweden
View GitHub Profile
@unders
unders / svelte-summit-2020-summary.md
Created October 23, 2020 16:01 — forked from vedam/svelte-summit-2020-summary.md
links and ressources from the svelte-summit-2020 talks

You'll find the talks here


Morgan Williams @mrgnw

The Zen of Svelte

Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.

@unders
unders / tester.js
Created November 3, 2018 18:43 — forked from freedmand/tester.js
JavaScript unit testing in under 30 lines
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
@unders
unders / crypto_news.json
Created July 19, 2018 09:16 — forked from stungeye/crypto_news.json
News Site RSS Feeds
[
{
"url": "http://money.cnn.com",
"rss": "http://rss.cnn.com/rss/money_topstories.rss"
},
{
"url": "http://thehill.com",
"rss": "http://thehill.com/rss/syndicator/19110"
},
{
@unders
unders / formtastic.rb
Created February 10, 2014 09:14 — forked from rjz/formtastic.rb
# config/initializers/formtastic.rb
module FormtasticBootstrap
class FormBuilder < Formtastic::FormBuilder
# Allow "split-field" inputs such as name (first+last) or location (city+state).
# Block contents are wrapped in a ".controls" field set next to the specified
# +label+
#
# Usage:
#
@unders
unders / tmux.sh
Created June 12, 2013 18:44 — forked from reborg/tmux.sh
Handy tmux.sh to add to your new Clojure project that creates a single window with one main Vim pane and a secondary small at the bottom which runs Midje autotest on top of a lein repl session.
export PROJECT_NAME=$1
export WORKING_DIR=/me/prj/$PROJECT_NAME
cd $WORKING_DIR;
# create the session
tmux start-server
tmux new-session -d -s $PROJECT_NAME -n work
# start vim in working dir
tmux select-window -t$PROJECT_NAME:1
@unders
unders / chef_solo_bootstrap.sh
Created October 13, 2012 12:26 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap-Chef-Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@unders
unders / edit.html.mustache
Created July 6, 2012 08:50 — forked from dbi/edit.html.mustache
Rails form helper for mustache spike/proof of concept
<!-- A scaffolded edit view converted to mustache -->
<h1>Editing post</h1>
{{#form}}
{{#errors?}}
<div id="error_explanation">
<h2>{{error_header}}</h2>
</div>
<ul>
@unders
unders / index.html
Created January 2, 2012 12:33 — forked from plamere/index.html
Demonstration of how to call the Echo Nest API from a Spotify App
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Playlister</title>
<link rel="stylesheet" href="sp://import/css/adam.css">
<link rel="stylesheet" href="styles.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
@unders
unders / gist:1427613
Created December 3, 2011 17:17 — forked from dhh/gist:1014971
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end