Skip to content

Instantly share code, notes, and snippets.

<VirtualHost *:8888>
SetEnv APP_DEBUG true
SetEnv TESTING true
SetEnv DB_CONNECTION mysql_testing
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log common
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 10
// Exepected
[
"user": {
"admin":false,
"display_name":"Rex Senger",
"email":"wKrajcik@hotmail.com",
"fname":"Rex",
"id":5,
"lname":"Senger",
"verified":null
+ Model
+ Attributes
+ id: 1 (number)
+ title: (string) `Constitution of the United States`
+ slug: `constitution` (string) - URL slug
+ thumbnail: `/img/doc-70/default.jpeg` (string)
+ created_at: (date) `2014-06-10T13:02:26+00:00`
+ updated_at: (date) `2015-09-17T14:38:47+00:00`
+ deleted_at: (date) `2015-09-17T14:38:47+00:00`
#!/usr/bin/env node
var exec = require('child_process').exec;
// TODO: COOOLLLOOORRRSSSSS
setInterval(function() {
process.stdout.write('\u001B[2J\u001B[0;0f');
exec('git status', function(err, stdout, stderr) {
console.log(stdout);
{
"name": "Kevin Falting",
"age": 1000,
"friends": [ "Seth", "Amanda" ],
"goals": [
{
"title": "Build bot plugin",
"completed": false
},
{
defmodule Sublist do
@doc """
Returns whether the first list is a sublist or a superlist of the second list
and if not whether it is equal or unequal to the second list.
"""
def compare(a, b) do
cond do
a == b -> :equal
a == [] -> :sublist
b == [] -> :superlist
def send_secure_pdf(str, user, title, orientation, password)
# Pull in output as email attachment
base = "#{Rails.root}/tmp/#{Time.now.to_i}-#{(rand*50).round}"
unsecured_file = "#{base}.pdf"
secured_file = "#{base}_secure.pdf"
pdf = WickedPdf.new.pdf_from_string(str, orientation: orientation)
File.open(unsecured_file, 'wb') do |file|
var myFuncWithPromise = function() {
return new Promise(function(resolve, reject) {
// if everything goes well then..
if (everythingWentWell) return resolve('success!');
// otherwise, reject it and send along an error
return reject(new Error('wtf dude'));
});
};
myFuncWithPromise()
<?php
/**
* Plugin Name: Renewal Reminder
* Plugin URI: http://www.sethetter.com
* Description: Sends email reminders for members to renew memberships 30 days in advanced and when it has expired.
* Version: 0.0.0
* Author: Seth Etter
* Author URI: http://www.sethetter.com
* License: GPL2
*/
@sethetter
sethetter / nfws-notes.md
Last active August 29, 2015 14:22
nfws-notes.md

IT Job Climate in Wichita

Demand

Employers

  • NetApp
  • Wolters Kluwer
  • High Touch Technologies
  • Social Networking Technology
  • CallCap