Connect the SD card to your computer and open the terminal.
- Find the disk id
df -h
# db/migrate/20110714024435_split_author.rb | |
class SplitAuthor < ActiveRecord::Migration | |
def self.up | |
Post.where(:author=>nil).each do |p| | |
author = Author.create!(:name => p.author_name, | |
:account_id => p.account_id) | |
p.author = author | |
p.save! | |
end | |
end |
public class TransformationStepdefs { | |
private RequestSpecification spec = RestAssured.with(); | |
@Given("^I have a single \"([^\"]*)\" file$") | |
public void I_have_a_single_file(String format) throws Throwable { | |
spec.given(). | |
multiPart("requestData", objectAsJson()). | |
header("Version", 1); | |
} |
#!/usr/bin/env bash | |
source super.bash | |
foo() { | |
echo hello | |
} | |
super_function foo | |
foo() { |
Connect the SD card to your computer and open the terminal.
df -h
var browserSync = require("browser-sync"); | |
browserSync.use({ | |
plugin: function () { /* noop */}, | |
hooks: { | |
'client:js': require("fs").readFileSync("./reloader.js", "utf-8") // Link to your file | |
} | |
}); | |
browserSync({ |
test: | |
adapter: sqlite3 | |
encoding: utf8 | |
pool: 5 | |
timeout: 5000 | |
database: ":memory:" | |
verbosity: quiet |
# ** ERROR 1 ** | |
# FATAL: lock file "postmaster.pid" already exists | |
# HINT: Is another postmaster (PID 4646) running in data directory "/usr/local/var/postgres"? | |
# | |
# ** ERROR 2 ** | |
# Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? | |
# | |
# To fix one of this errors: | |
cat /usr/local/var/postgres/postmaster.pid # pid is the number on first line |
#!/bin/bash | |
EMAIL="your_email@example.com" | |
API_TOKEN="API_TOKEN" | |
DOMAIN_ID="your_domain.com" | |
RECORDS=(123456 234567 345678) # Replace with the Record ID | |
IP="`curl -s -S http://v4.ident.me`" | |
STORED_IP_ADDRESS_FILENAME="$HOME/.current_external_ip_address" | |
# Loop through each record id in the array |
class ActiveRecord::Base | |
mattr_accessor :shared_connection | |
@@shared_connection = nil | |
def self.connection | |
@@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection } | |
end | |
end | |
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection |
#!/usr/bin/env ruby | |
exact_matches = {} | |
partial_matches = {} | |
no_matches = [] | |
puts "Searching /Applications for things that exist in cask…" | |
Dir.glob('/Applications/*.app').each do |app| | |
app_name = File.basename(app) | |
search_term = File.basename(app, ".*").downcase.split(/\s/)[0] |