If you don't already have Composer installed: Launch Git Bash, enter the following command: curl -s https://getcomposer.org/installer | php
This installs composer...
If you aren't already in your project folder, cd
to it.
If you don't already have Composer installed: Launch Git Bash, enter the following command: curl -s https://getcomposer.org/installer | php
This installs composer...
If you aren't already in your project folder, cd
to it.
<?php | |
Event::listen('illuminate.query', function($query, $bindings, $time) { | |
static $count; | |
if(App::make('env') === 'local') | |
{ | |
$logFile = __DIR__.'/../storage/logs/queries'; | |
ob_start(); | |
var_dump($bindings, $query); | |
$str = ob_get_clean(); | |
if($count === null) |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde* | |
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions |
-- | |
-- open currently open URL in Safari in Chrome | |
-- forked from https://gist.github.com/3151932 | |
-- | |
property theURL : "" | |
tell application "Safari" | |
set theURL to URL of current tab of window 1 | |
end tell | |
if appIsRunning("Google Chrome") then |
You can have a linear workflow with the array functions.
The following is unreadable:
$output = array_reduce(
array_map(
function($n) { return $n ** 2; }
array_filter($input, function($n) { return $n % 2 == 0; })
),
{ | |
"title": "Keychron K7 Mac mode", | |
"rules": [ | |
{ | |
"description": "K7 Fn2 + ESC: Toggle swapping ESC/backtick(default).", | |
"manipulators": [ | |
{ | |
"description": "Enable swapping ESC/backtick", | |
"type": "basic", | |
"from": { |
#!/bin/bash | |
# This script takes a PDF or list of PDFs and outputs a file(s) | |
# named <file>_scanned.pdf that looks like it has been scanned | |
# | |
# Requires imagemagic and popper to be installed (brew install imagemagick poppler) | |
# | |
# Accepts: a list of files | |
# Usage: ./<scriptfilename> pdf1.pdf pdf2.pdf | |
# | |
# To use as a macOS automator quick action you need to: |