Skip to content

Instantly share code, notes, and snippets.

Carlos Rodrigues crodrigues

Block or report user

Report or block crodrigues

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fgilio
fgilio / axios-catch-error.js
Last active Jan 17, 2020
Catch request errors with Axios
View axios-catch-error.js
/*
* 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 😨
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active Jan 8, 2020
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
View all_aws_lambda_modules_python.md

This gist contains lists of modules available in

in AWS Lambda.

It also contains the code to run in Lambda to generate these lists. In addition there is a less_versbose module in the code that you can call to get a list of the top level modules installed and the version of those modules (if they contain a version

@Wack0
Wack0 / gist:bda47c2bfadfb68d73ea
Created Jul 29, 2015
Cards against Security: list of all cards
View gist:bda47c2bfadfb68d73ea
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. |
@discordier
discordier / gist:ed4b9cba14652e7212f5
Created Dec 4, 2014
options for phpStorm @noinspection annotation
View gist:ed4b9cba14652e7212f5
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@mathiasverraes
mathiasverraes / lambdalicious.php
Created Nov 17, 2014
Lambdalicious blog post
View lambdalicious.php
<?php
require_once __DIR__ . 'path/to/src/Verraes/Lambdalicious/load.php';
assert(
isatom(@my_atom)
);
atom(@my_atom);
assert(
isatom(my_atom)
View bootstrap-sass-mixin-cheatsheet.scss
// 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);
@itsmikita
itsmikita / uninstall-laravel-workbench-package
Last active Oct 18, 2017
How to remove/uninstall Laravel workbench packages
View uninstall-laravel-workbench-package
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 Mar 22, 2012
Demo of PHP workaround for large integers in JSON data responses
View json-int.php
<?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
You can’t perform that action at this time.