Skip to content

Instantly share code, notes, and snippets.

View kapooostin's full-sized avatar

Vladimir Kapustin kapooostin

View GitHub Profile
@jonphipps
jonphipps / whoops.base.css
Created January 30, 2016 22:38
Small fix to whoops 2.0 css
.frame-file .editor-link {
color: #67B3FF;
text-decoration: underline;
}
@jonphipps
jonphipps / .env
Last active February 7, 2016 21:23
Modified .env
LOCAL_HOME=/Users/joeblough
SERVER_HOME=/home/vagrant
...
DB_CONNECTION=mysql
...
@jonphipps
jonphipps / Handler.php
Last active February 7, 2016 21:23
Modified app/Exceptions/Handler.php
<?php
...
if ($request->ajax() || $request->wantsJson()) {
$whoops->pushHandler(new JsonResponseHandler());
} else {
$handler = new PrettyPageHandler();
//$handler->setEditor('phpstorm');
$handler->setEditor(
function ($file, $line) {
@jonphipps
jonphipps / Handler.php
Last active February 7, 2016 21:24
app/Exceptions/Handler.php
<?php
...
if ($request->ajax()) {
$whoops->pushHandler(new \Whoops\Handler\JsonResponseHandler());
} else {
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
}
@Avaq
Avaq / combinators.js
Last active March 18, 2025 22:17
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active March 12, 2025 04:26
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

The Laracasts PHPStorm theme - modified.

This is a slightly modified version of the great Laracasts PHPStorm theme. I've added some styles for Verions Control (add, modified, deleted line...) and fixed some missing things like warnings.

Download

image

Mac: Add to ~/Library/Preferences/WebIde80/colors

@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active February 5, 2025 03:03
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@Djuki
Djuki / LaravelHelper.php
Created December 9, 2014 10:29
Codeception helper for Laravel3 integration
<?php
namespace Codeception\Module;
use Codeception\Util\Framework;
use Codeception\TestCase;
use Codeception\Util\Connector\Universal;
use Codeception\Configuration;
use Symfony\Component\BrowserKit\Response;
use Laravel\Routing\Router;