Skip to content

Instantly share code, notes, and snippets.

View icemancast's full-sized avatar

Isaac Castillo icemancast

View GitHub Profile
@icemancast
icemancast / front-end.md
Last active August 29, 2015 14:24
Install for front end

Setting up front end project

  1. Bower init

  2. Add .bowerrc with following

This tells bower where to install sass files.

{
// get bootstrap template from either:
// getboostrap.com, wrapbootstrap, or some other site
// create website for Acme Company
// HOME PAGE
// simple welcome
// ABOUT PAGE (input bacon ipsum)
@icemancast
icemancast / count_dracula.php
Created October 3, 2014 20:20
count dracula program to count
<?php
$count = 0;
do {
$count++;
echo `say $count . ' bat... ah ah'`;
} while($count < 5);
sleep(1);
# make sure path is set properly
export PATH=/usr/local/bin:$PATH
# shortcuts to edit and reload bash profile
alias ebp="vim ~/.bash_profile"
alias rbp="source ~/.bash_profile"
alias test
# shortcut to edit hosts file
alias ehf="sudo vim /etc/hosts"

Getbootstrap.com

  1. pick template
  2. or bootswatch
  3. create a local template blog.html in codeup.dev
  4. get creative with look
  5. load moment.js file
  6. use moment.js to alter the date
  7. load your own javascript file for your js code
  8. post json should follow format:
@icemancast
icemancast / elaine.php
Last active August 29, 2015 14:05
Elaine Likes Me Alot
<?php
// Remember the class is aware.
// ==========================
function askElaine() {
echo 'Do you like me yes || no!' . PHP_EOL;
}
function doesLikeMe() {
echo 'I just want to be friends!' . PHP_EOL;
<%= link_to 'Deposit', new_transaction_path(type: 'deposit') %>
# routes
get 'transactions/new/:type' => 'transactions#new'
resources :transactions
transactions GET /transactions(.:format) transactions#index
POST /transactions(.:format) transactions#create
new_transaction GET /transactions/new(.:format) transactions#new
edit_transaction GET /transactions/:id/edit(.:format) transactions#edit
@icemancast
icemancast / PostsController.php
Last active August 5, 2016 13:20
Laravel return json from url
// Create an action for the route
public function postToJson()
{
// Query here for json you want to return
$post = Post::all();
// Send to json response
return Response::json($post->toArray(), 200);
}
<?php
return array(
'debug' => true,
);
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
export PATH="/usr/local/bin:/usr/local/bin/subl:~/bin:$PATH"