I like to work using a separate tmux session for each active project/folder that I'm juggling. This script will either create or attach to a project based on it's name, using fasd to jump to the directory directly. The project will be named based on the basename of the folder, for easy switching using TMUX-s.
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/sh | |
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm | |
sudo yum install -y mysql-community-client |
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 | |
//example: | |
$query = Foo::where('id', '=', 1)->where('name', '=', 'bar'); | |
//would produce the following raw query: | |
//select * from foo where id = ? and name = ?; | |
dd(vsprintf(str_replace('?', '%s', $query->toSql()), collect($query->getBindings())->map(function($binding){ | |
return is_numeric($binding) ? $binding : "'{$binding}'"; |
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
// H&Co Typography mixin ------------------------------------------------------------- | |
// | |
// $fontFamily: gotham, Sentinel, whitney | |
// $fontWeight: light, book, medium, semibold, bold, black | |
// $SSm: true, false (ScreenSmart Font?) | |
// $fontStyle: normal, italic | |
// | |
// USAGE: @include HoefFont(gotham, bold, true); | |
@function capitalize($string) { |
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 | |
class MyModel extends Eloquent { | |
public function getSql() | |
{ | |
$builder = $this->getBuilder(); | |
$sql = $builder->toSql(); | |
foreach($builder->getBindings() as $binding) | |
{ |