Skip to content

Instantly share code, notes, and snippets.

View darkcolonist's full-sized avatar
🐣
I rise from the fire, stronger and brighter.

Christian Noel Reyes darkcolonist

🐣
I rise from the fire, stronger and brighter.
View GitHub Profile
@paulofreitas
paulofreitas / AuthServiceProvider.php
Last active July 7, 2023 13:15
Extending the default Eloquent User Provider (Laravel 5.4+)
<?php
namespace App\Providers;
use App\Auth\UserProvider;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 29, 2024 13:29
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@ipbastola
ipbastola / cifs-mount.md
Created July 21, 2016 12:29
How to mount CIFS into Ubuntu 14.04-x64 LTS

CIFS Mount on Ubuntu 14.04

1. Install packages

$ sudo apt-get install cifs-utils

2. Create a Mount point Directory

$ sudo mkdir /mnt/CIFSMOUNT
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@dotcomputercraft
dotcomputercraft / gist:b7283bd52f4b5389e748
Last active November 4, 2023 13:05
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
@tburry
tburry / htaccess.txt
Last active March 10, 2022 01:58
.htaccess file for pretty urls that route through index.php
# Original
# If you modify this file then change the above line to: # Modified
<IfModule mod_rewrite.c>
RewriteEngine On
# Certain hosts may require the following line.
# If vanilla is in a subfolder then you need to specify it after the /.
# (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
# RewriteBase /
# The basic rewrtie rule.
<?php
/**
*
* Last version: https://gist.github.com/josecanciani/ff535426bd5d453ef9c2
*
* Credits (adapted from): https://gist.github.com/doubleking/6117215
*
**/
@Integralist
Integralist / GitHub curl.sh
Last active September 7, 2023 03:53 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@nightfox
nightfox / Redis as a Service
Last active March 10, 2019 01:12
Installing Redis Server as a service
sudo vim /etc/redis/redis.conf
Change the following lines
daemonize yes
bind 127.0.0.1
dir /var/lib/redis
wget https://gist.github.com/nightfox/8153193/raw/553c375424866e8d0d0bd5b48d23578c93031bce/redis-server
@kethinov
kethinov / walksync.js
Created September 22, 2013 09:04
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {