Skip to content

Instantly share code, notes, and snippets.

View marlocorridor's full-sized avatar
🏠
Working from home

mcorridor marlocorridor

🏠
Working from home
View GitHub Profile
anonymous
anonymous / config.json
Created December 25, 2014 00:07
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@marlocorridor
marlocorridor / callout.scss
Last active November 9, 2016 03:43 — forked from mattsimpson/docs style (bootstrap)
This is the Twitter Bootstrap documentation's callout css. Looks nice.
// Brands
$brand-primary: #3097D1;
$brand-info: #8eb4cb;
$brand-success: #2ab27b;
$brand-warning: #cbb956;
$brand-danger: #bf5329;
.bs-callout {
padding: 20px;
margin: 20px 0;
@marlocorridor
marlocorridor / laravel_seeder.sh
Last active December 15, 2016 14:06
Make laravel seeder work properly - solves class not found
# To work something like
# php .\artisan db:seed --class=UsersTableSeeder
# where `UsersTableSeeder` is a newly created class on seeder file
# you need to execute this first
composer dump-autoload
# Reference :)
#http://laravel.io/forum/01-31-2015-laravel5-seeder-reflectionexception-class-tableseeder-does-not-exist-in-illuminatecontainercontainerphp776
# You should never forget, even when it sounds dummy to dump the autoload files with the command "composer dump-autoload" to make the seeders work properly.
@dejancencelj
dejancencelj / MSWordHtmlCleaners.js
Created July 27, 2017 19:51 — forked from ronanguilloux/MSWordHtmlCleaners.js
2 js solutions to clean nasty MS Word HTML pasted in any CMS + 2 server-side tips
var CleanWordHTML = function ( str )
{
str = str.replace(/<o:p>\s*<\/o:p>/g, "") ;
str = str.replace(/<o:p>.*?<\/o:p>/g, "&nbsp;") ;
str = str.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ;
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ;
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;
str = str.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ;
str = str.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
str = str.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
@ostark
ostark / cloudflareWhitelistUpdate.php
Last active April 15, 2019 06:40
Updates the .htaccess with the recent ClouldFlare IPs
<?php
# Exec during deployment
# php cloudflareWhitelistUpdate.php public/.htaccess
$srcUrls = [
'https://www.cloudflare.com/ips-v4',
'https://www.cloudflare.com/ips-v6'
];
$htacessFile = $argv[1] ?? '.htaccess';
@jordelver
jordelver / gist:3139365
Created July 18, 2012 22:29
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@yosemitebandit
yosemitebandit / key-fingerprint
Created March 7, 2012 18:27
view your ssh public key's fingerprint; compare this to what Github has listed in the ssh key audit
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA)
@barbietunnie
barbietunnie / laravel-production-permissions.md
Last active June 19, 2023 06:04
MySQL Database User GRANT permissions for Laravel

MySQL Database User GRANT permissions for Laravel

For security reasons, you should probably grant select, delete, update and insert to your app user in production.

Have another user who can do alter, create, drop and index when running migrations.

If you run seeders in production, also grant select, insert and references to the migration user.

Yeah, 2 users, migrations are not always run in production everyday and this keeps more secure your database.

@kleo
kleo / backspace.md
Last active July 28, 2023 17:59
backspace

Project moved due to excessive amount of unicorns. Repo https://git.io/adminpldt

Our community of amazing people. Managed by a cat. Backspace https://discord.gg/C43625u

Gist here will not be updated anymore Discussion here on Gist is still allowed but I strongly recommend going over to the repository or Discord chat


@mrabbani
mrabbani / mailgun-config.md
Last active January 8, 2024 01:45
Laravel Mailgun Setup