Skip to content

Instantly share code, notes, and snippets.

@sachintaware
sachintaware / .bash_profile
Last active August 29, 2015 14:28 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
<?php namespace App\Services;
use App\User;
class AclPermitted
{
public static function verify( $permission )
{
/** @var User $user */
$user = app( 'auth' )->user();

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

<?php namespace App\Services;
use App\User;
class AclPermitted
{
public static function verify( $permission )
{
/** @var User $user */
$user = app( 'auth' )->user();
# The Nginx configuration based on https://coderwall.com/p/rlguog
http {
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_timeout 15m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
AsyncProcess = require('./async-process').AsyncProcess
describe('AsyncProcess', function() {
var asyncProcess;
beforeEach(function() {
asyncProcess = new AsyncProcess();
});
it('should process 42', function() {
# RSpec
require 'spec/expectations'
# Webrat
require 'webrat'
require 'test/unit/assertions'
World(Test::Unit::Assertions)
Webrat.configure do |config|
var serialport = require('node-serialport')
var sp = new serialport.SerialPort("/dev/ttyO3", {
parser: serialport.parsers.raw,
baud: 9600
})
sp.on('data', function(chunk) {
console.log(chunk.toString('hex'), chunk.toString(), chunk)
})