is_archived=*
: Returns a list of both soft-deleted and non-soft-deleted recordsis_archived=true
: Returns a list of only soft-deleted recordsis_archived=false
: Returns a list of only non-soft-deleted records- absent
is_archived
: Returns a list of only non-soft-deleted records
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Suggested packages for a MacBook Pro | |
# Created Sep 2017 for a MacBook Pro Late 2013 | |
lsb_release -a | |
# -> Description: Ubuntu 17.04 | |
# -> Codename: zesty | |
# Read your model | |
sudo dmidecode -s system-product-name | |
# -> MacBookPro11,3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<code><pre> | |
{% set root_val = varilable_to_debug %} | |
root_val: {{ root_val }} | |
{{ root_val|length }} | |
{% for key, value in root_val %} | |
root_val.{{ key }} => {{ value }} | |
{% for key2, value2 in value %} | |
root_val.{{ key }}.{{ key2 }} :: {{ value2 }} | |
{% for key3, value3 in value2 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lodash = require('lodash'); | |
var _seenObjects = []; | |
var recurseKeys = function(name, obj){ | |
var duplicate; | |
if (( duplicate = lodash.find(_seenObjects, function(seen){ | |
return seen.obj === obj; | |
}) )) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var run_cmd = function(cmd, args) { | |
var promise = require('bluebird'); | |
return new promise(function (resolve, reject) { | |
var spawn = require('child_process').spawn; | |
var child = spawn(cmd, args); | |
var resp = ""; | |
child.stdout.on('data', function (buffer) { resp += buffer.toString() }); | |
//child.stdout.on('end', function(){ resolve(resp); }); | |
child.on('close', function(exitCode){ resolve(resp); }); // < This might be more approperate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## db/seeds.rb | |
['all', Rails.env].each do |seed| | |
seed_file = Rails.root.join('db', 'seeds', "#{seed}.rb") | |
if File.exists?(seed_file) | |
puts "*** Loading #{seed} seed data" | |
require seed_file | |
end | |
seed_dir = Rails.root.join('db', 'seeds', seed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'docile' | |
require 'linguistics' | |
Linguistics.use :en | |
class BuilderConfig | |
def initialize | |
@paths = @@paths | |
@versions = @@versions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Normal git log | |
git log -3 | |
# commit 58c7c712ad122bb4739a761d71684dcb23364831 | |
# Author: Nathan Perry <[email protected]> | |
# Date: Wed Mar 19 22:10:39 2014 -0400 | |
# | |
# Update README.md | |
# | |
# commit cd3137dad3d7debd622885445e0d117246b65603 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workspace files | |
*.iw7 | |
*.iw9 | |
# Build log files | |
*.log |