Skip to content

Instantly share code, notes, and snippets.

View mjaschen's full-sized avatar
😏
What's happening?

Marcus Jaschen mjaschen

😏
What's happening?
View GitHub Profile
@Edwin-Luijten
Edwin-Luijten / Install_L4.md
Created October 10, 2012 08:03
Install Illuminate (Laravel 4)

Install Illuminate (Laravel 4)

1 Install Composer

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...

2 Clone Illuminate (Laravel 4)

If you aren't already in your project folder, cd to it.

@kapv89
kapv89 / query-logger.php
Last active January 8, 2019 15:21
Log Queries in L4
<?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)

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@marcj
marcj / do-it.sh
Last active April 12, 2020 08:47
OSX PhpStorm, better performance - more FPS using OpenGL
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
@mindplay-dk
mindplay-dk / collections.md
Last active June 6, 2021 14:37
Linear collection workflow

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; })
 ),
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@westonruter
westonruter / amp-reader-nav-menu.php
Last active May 9, 2022 16:35
Basic plugin which adds a nav menu to Reader mode templates in the AMP plugin. When in Reader mode, upon activation a new “AMP Reader Sidebar” nav menu location is available for assigning the desired nav menu. Temporary until closed: https://github.com/ampproject/amp-wp/issues/2044
<?php
/**
* Plugin Name: AMP Reader Nav Menu
*
* @package AMP_Reader_Nav_Menu
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
* @wordpress-plugin
@jhorology
jhorology / keychron-k7.json
Created September 18, 2021 07:17
karabiner-elements complex modifications for Keychron K7
{
"title": "Keychron K7 Mac mode",
"rules": [
{
"description": "K7 Fn2 + ESC: Toggle swapping ESC/backtick(default).",
"manipulators": [
{
"description": "Enable swapping ESC/backtick",
"type": "basic",
"from": {
@Pezmc
Pezmc / fake-scan-automator.sh
Last active October 6, 2023 08:26 — forked from andyrbell/scanner.sh
Make a pdf look scanned with macOS automator as a quick action
#!/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: