Skip to content

Instantly share code, notes, and snippets.

View crodrigues's full-sized avatar

Carlos Rodrigues crodrigues

View GitHub Profile
@mathiasverraes
mathiasverraes / lambdalicious.php
Created November 17, 2014 09:13
Lambdalicious blog post
<?php
require_once __DIR__ . 'path/to/src/Verraes/Lambdalicious/load.php';
assert(
isatom(@my_atom)
);
atom(@my_atom);
assert(
isatom(my_atom)
@itsmikita
itsmikita / uninstall-laravel-workbench-package
Last active July 15, 2020 18:33
How to remove/uninstall Laravel workbench packages
Since I was looking all around how to uninstall packages and after reading tones
of documentations here's the short how-to uninstall a workbench package in Laravel
(or how I managed it to work out):
1. Remove package service provider from 'providers' array in app/config/app.php
2. Remove the package folder in workbench/
3. Run:
@bcantoni
bcantoni / json-int.php
Created March 22, 2012 19:42
Demo of PHP workaround for large integers in JSON data responses
<?php
/* Demonstration of problem with large integers in JSON, and
a couple options for dealing with them as strings instead.
ref:
* http://php.net/manual/en/function.json-decode.php
* http://stackoverflow.com/questions/2907806/handling-big-user-ids-returned-by-fql-in-php
*/
$json = <<<EOT
#!/usr/bin/env php
<?php
function helpMessage($exit = 0) {
echo <<<EOT
Delay output by specified number of seconds.
-t <float> duration in seconds
EOT;
@Wack0
Wack0 / gist:bda47c2bfadfb68d73ea
Created July 29, 2015 02:26
Cards against Security: list of all cards
Database: heroku_1ed5a148e6d9415
Table: black_cards
[16 entries]
+----+--------------------------------------------------------------------------------------------------------------+
| id | content |
+----+--------------------------------------------------------------------------------------------------------------+
| 1 | _____ means never having to say you're sorry. |
| 2 | The pen tester found _____ in the trash while dumpster diving. |
| 3 | Our CIO has a framed a picture of _____. |
| 4 | 9 out of 10 experts agree, _____ will increase your security effectiveness. |
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@discordier
discordier / gist:ed4b9cba14652e7212f5
Created December 4, 2014 06:23
options for phpStorm @noinspection annotation
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active April 3, 2024 20:42
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: