I hereby claim:
- I am lachlanjc on github.
- I am lachlanjc (https://keybase.io/lachlanjc) on keybase.
- I have a public key whose fingerprint is 9A63 A29B 51A1 4185 4E9B D90A 92EF E806 C67D B148
To claim this, I am signing this object:
# Kickoff. The quickest way to start new rails apps | |
# How it works: | |
# 1. Install the gem: `$ gem install kickoff-rails` | |
# 2. Generate your kickoff file `$ kickoff new myapp` | |
# 3. Edit the kickoff file to specify the foundation of your app | |
# 4. Generate your app: `$ kickoff` | |
# Set up your database | |
database = 'postgresql' # or 'sqlite3' or 'mysql' |
#!/bin/bash | |
for file in $@ | |
do | |
svgo $file | |
done |
def md_file(name) | |
file_contents = File.open(Rails.root + 'public/' + name.to_s).read | |
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, underline: true, space_after_headers: true, strikethrough: true) | |
return markdown.render(file_contents).html_safe | |
end |
mkdir app | |
cd app | |
touch app.rb | |
touch Gemfile | |
touch config.ru | |
mkdir views | |
mkdir public | |
touch views/index.erb | |
touch public/app.css | |
echo "require './app'" > config.ru |
#!/usr/bin/env bash | |
cd src | |
wintersmith build | |
cd .. | |
rm build/* | |
mv src/build/* . | |
rm -rf src/build | |
open . | |
git add . |
.brt1 { border-radius: .125rem .125rem 0 0; } | |
.brt2 { border-radius: .25rem .25rem 0 0; } | |
.brt3 { border-radius: .5rem .5rem 0 0; } | |
.brt4 { border-radius: 1rem 1rem 0 0; } | |
.brt5 { border-radius: 2rem 2rem 0 0; } | |
.brr1 { border-radius: 0 .125rem .125rem 0; } | |
.brr2 { border-radius: 0 .25rem .25rem 0; } | |
.brr3 { border-radius: 0 .5rem .5rem 0; } | |
.brr4 { border-radius: 0 1rem 1rem 0; } | |
.brr5 { border-radius: 0 2rem 2rem 0; } |
I hereby claim:
To claim this, I am signing this object:
def file_extension(filename) | |
filename.gsub /\w+\./, '' | |
end | |
def base64_img(kind, data) | |
"data:image/#{kind};base64,#{Base64.encode64(data)}" | |
end |
require 'net/http' | |
File.read('links.txt').lines.each do |link| | |
filename = link.scan(/(\w+)/).flatten.join('-') | |
path = "/Users/me/Desktop/#{filename}" | |
File.open(path, 'wb') do |f| | |
f.write Net::HTTP.get(URI(link.chomp)) | |
end | |
end |
//--------------------------- | |
// Spacing utilities | |
//--------------------------- | |
$__space-default: 1rem; | |
@function space($level: 1) { | |
@if $level <= 4 { | |
@if $level == 0 { | |
@return ($__space-default / 2); | |
} @else { |