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 prompt with colour-coded exit status | |
PS1="\e[0;36m\]\h \`if [ \$? = 0 ]; then echo '\e[01;32m\]\w\e[00m\]\$ '; else echo '\e[01;31m\]\w\e[00m\]\$ '; fi\`" | |
# Or for local machine: | |
# PS1="\e[0;46m\]\h\e[00m\] \`if [ \$? = 0 ]; then echo '\e[01;32m\]\w\e[00m\]\$ '; else echo '\e[01;31m\]\w\e[00m\]\$ '; fi\`"; | |
# Ctags | |
alias rbtags='ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)' | |
alias pytags='ctags -R --languages=python' | |
# Git shortcuts |
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
<!-- | |
Requires Bootstrap and jQuery. | |
--> | |
<script type="text/javascript"> | |
$(function() { | |
$('.calc-input').change(function() { | |
$('#calc-output').val(parseInt($('#calc-quantity').val()) * parseInt($('#calc-prefix').val())); | |
}).trigger('change'); | |
}); |
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
<template> | |
<select ref="select"> | |
<option v-if="!this.value"></option> | |
</select> | |
</template> | |
<script> | |
export default { | |
props: ['options', 'url', 'placeholder', 'allow_clear', 'label', 'value'], |
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
WWW ?= /var/www | |
WWW_USER ?= apache | |
WWW_GROUP ?= wheel | |
js_assets = public/js/app.js | |
css_assets = public/css/app.css | |
assets = $(js_assets) $(css_assets) | |
css_deps = $(shell find resources/assets/sass/ -name '*.css' -o -name '*.scss') | |
js_deps = $(shell find resources/assets/js/ -name '*.js' -o -name '*.vue') | |
rsync_src = vendor storage config app public resources bootstrap routes artisan composer.* |
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 | |
namespace MySQLi\PDO\Adapter; | |
use PDO; | |
use PDOStatement; | |
class Connection | |
{ | |
public $affected_rows; |
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
fr = @(l, c) 1 / (2 * pi * sqrt(l*c) ); | |
xl = @(l, c) 2 * pi * fr(l, c) * l; | |
xc = @(l, c) 1 / (2 * pi * fr(l, c) * c); | |
q = @(l, c, r) r / xl(l, c); | |
bw = @(l, c, r) fr(l, c) / q(l, c, r); |