- response
- Transform output
This file contains 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
app.directive('capitalize', function($parse) { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function(scope, element, attr, ngModel) { | |
//Process input + return processed value | |
var capitalize = function(inputValue) { | |
if (inputValue) { | |
//Capitalize first word |
Copyright (c) 4-digit year, Company or Person's Name
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
This file contains 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
x = (y < 100) ? "dog" : | |
(y < 150) ? "cat" : | |
(y < 300) ? "bar" : "baz"; |
This file contains 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
.bash_rc | |
.inputrc | |
.gitconfig |
This file contains 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
# Copied from http://ngtuna.blogspot.com/2013/12/download-continuously-with-curl.html | |
#! /bin/bash | |
export done=1; | |
while [ $done -gt 0 ]; do | |
/usr/bin/curl -O -C - $1; | |
export done=$?; | |
done | |
if [ $done -eq 0 ]; then |
This file contains 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
# Shortcut Navigation | |
alias go-project="cd ~/Projects" | |
# Shortcut SSH | |
alias remote-offspring="ssh offspri1@offspringdigital.com" | |
alias remote-lamp-aws="ssh -i ~/Documents/lamp-server.pem ec2-user@52.64.104.76" | |
alias remote-vps="ssh tucq@128.199.179.134" | |
# Function | |
shopt -s cdspell |
This file contains 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
#!/bin/bash | |
yum groupinstall 'Development tools' -y | |
yum install ncurses ncurses-devel wget git -y | |
cd /usr/local/src | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
tar -xjf vim-7.4.tar.bz2 | |
cd vim74 | |
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp | |
make && make install |
This file contains 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
$fplog = fopen("logb.txt", "a+"); | |
$lastlogtime = time(); | |
function log_time($logtext) | |
{ | |
global $fplog, $lastlogtime; | |
$nowtime = time(); | |
$diff = $nowtime - $lastlogtime; | |
fwrite($fplog, sprintf("%-30s | %-30s | %-3d", $logtext, date('F Y h:i:s A', $nowtime), $diff) . PHP_EOL); |
This file contains 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
<?php | |
public function routeClass() | |
{ | |
$routeArray = Str::parseCallback(Route::currentRouteAction(), null); | |
if (last($routeArray) != null) { | |
// Remove 'controller' from the controller name. | |
$controller = str_replace('Controller', '', class_basename(head($routeArray))); |