This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer. | |
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc). | |
# Install rvm (no sudo!) | |
# ------------------------------------------------------ | |
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
source ~/.rvm/scripts/rvm | |
rvm install ree-1.8.7-2010.02 |
!!! 5 | |
%html | |
%head | |
%title= "Your Website" | |
%meta{ :content => "", :name => "description" } | |
%meta{ :content => "", :name => "author" } | |
%meta{ :content => "3 days", :name => "revisit-after" } | |
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" } | |
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" } | |
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" } |
{ | |
"color_scheme": "Packages/User/textmate-solarized/Solarized (Dark).tmTheme", | |
"default_line_ending": "unix", | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"draw_white_space": "selection", | |
"find_selected_text": true, | |
"font_face": "menlo", | |
"font_size": 12, | |
"highlight_line": true, |
javascript:( | |
function(){ | |
f=’http://delicious.com/save?url=’+encodeURIComponent(window.location.href)+’&title=’+encodeURIComponent(document.title)+’&v=5&’; | |
a=function() | |
{ | |
if(!window.open(f+’jump=doclose’,'deliciousuiv5′,’location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550′)) | |
location.href=f+’jump=yes’ | |
}; | |
if(/Firefox/.test(navigator.userAgent)) | |
{ |
This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
class ActiveRecord::Base | |
def self.import!(record_list) | |
raise ArgumentError "record_list not an Array of Hashes" unless record_list.is_a?(Array) && record_list.all? {|rec| rec.is_a? Hash } | |
return record_list if record_list.empty? | |
(1..record_list.count).step(1000).each do |start| | |
key_list, value_list = convert_record_list(record_list[start-1..start+999]) | |
sql = "INSERT INTO #{self.table_name} (#{key_list.join(", ")}) VALUES #{value_list.map {|rec| "(#{rec.join(", ")})" }.join(" ,")}" | |
self.connection.insert_sql(sql) |
#!/usr/local/env bash | |
# Register vultr.com with free credit https://www.vultr.com/?ref=9206731-8H | |
# Create vps | |
# Tested on Ubuntu 18.04, Debian 10.0 | |
# How to... | |
# 1. Save this file as softether-installer.sh | |
# 2. chmod +x softether-installer.sh | |
# 3. Run bash file | |
# > ./softether-installer.sh | |
# Or just |
#!/bin/bash | |
# | |
# This file echoes a bunch of 24-bit color codes | |
# to the terminal to demonstrate its functionality. | |
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m | |
# The background escape sequence is ^[48;2;<r>;<g>;<b>m | |
# <r> <g> <b> range from 0 to 255 inclusive. | |
# The escape sequence ^[0m returns output to default | |
setBackgroundColor() |
# lib/tasks/db.rake | |
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
# | |
# This is the code from the comment: | |
# https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90#gistcomment-2275324 | |
# Made into a fork/separate gist for easier download, with redundant shell-script removed. | |
# | |
# | |
# Usage: |