Skip to content

Instantly share code, notes, and snippets.

View icemancast's full-sized avatar

Isaac Castillo icemancast

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Template</title>
<link rel="stylesheet" href="/assets/css/normalize.css">
<link rel="stylesheet" href="/assets/css/style.css">
</head>
<body>
<div class="container">
  • User Stories
  • Interface Mockups
  • Schema Design
  • Migrations
  • Seeders
  • Models
  • Model Relationships
  • Model Validation Rules
  • Master Template
  • Login Views, Routes, Actions, & Hashing
@icemancast
icemancast / gist:9fdb64c9fc1eb4e7b225
Created January 25, 2016 21:06
loop through selection
<select id="group-categories" name="group-categories" multiple class="form-control">
@foreach($categories as $id => $category)
@if($category == $group->category)
<option value="{{ $id }}" selected>{{ $category }}</option>
@else
<option value="{{ $id }}">{{ $category }}</option>
@endif
@endforeach
</select>
function get_testimonies($count = 4) {
$args = array(
'post_type' => 'codeup-testimonies',
'post_status' => 'publish',
'posts_per_page' => $count,
'orderby' => 'rand'
);
$loop = new WP_Query( $args );
<!DOCTYPE html>
<html>
<head>
<title>Javascript</title>
</head>
<body>
<script>
(function() {
<!DOCTYPE html>
<html>
<head>
<title>Javascript</title>
</head>
<body>
<script>
// (function() {
@icemancast
icemancast / .bash-profile
Created May 6, 2016 21:45 — forked from inooid/.bash-profile
[Terminal] Docker-machine env shortcut
# 1. Add this to your .bash-profile or .zshrc and restart your terminal
function dm-env () {
if [ -z "$1" ] ; then
echo "\e[0;31mERROR:\e[0m no argument supplied"
return;
fi
eval "$(docker-machine env $1)"
echo -e "\033[33;32mSUCCESS:\e[0m docker-machine environment set to: $1"
}
@icemancast
icemancast / joins.md
Created May 11, 2016 15:34 — forked from zgulde/joins.md
extra join exercises

Employees Database

  1. Using the example in the Associative Table Joins section as a guide, write a query that shows each department along with the name of the current manager for that department.

       Department Name    | Department Manager
      --------------------+--------------------
       Customer Service   | Yuchang Weedman
       Development        | Leon DasSarma
       Finance            | Isamu Legleitner
    

Human Resources | Karsten Sigstam

@icemancast
icemancast / access-policy.json
Created October 24, 2016 17:34 — forked from sapessi/access-policy.json
Policy for serverless bbq lab
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1476979875000",
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:Scan",
@icemancast
icemancast / 0_reuse_code.js
Created March 4, 2017 20:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console