Skip to content

Instantly share code, notes, and snippets.

View kingsloi's full-sized avatar

Kingsley Raspe kingsloi

View GitHub Profile
@ww9
ww9 / one-line-text-art-and-emojis_utf8_ascii.txt
Last active April 27, 2024 04:27
Emojis, UTF8, ASCII (one line) #misc
# Collection of one line text art (◕‿◕✿)
Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗
ּבּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
@CollinChaffin
CollinChaffin / How_to_disable_ATT_DNS_Redirection.md
Created August 29, 2018 21:26
How to disable the very little-known AT&T setting that can appear to hijack your home DNS lookups and redirect to 104.239.207.44

How to disable the very little-known AT&T setting that can appear to hijack your home DNS lookups and redirect to 104.239.207.44

Issue

DNS queries on home network suddenly resolving hosts to 104.239.207.44.

Symptoms

You will see SPORADIC mis-resolutions of EVERYTHING to that 104.239.207.44 address if their crappy router happens to hear your PC's DHCP request - EVEN IF ANOTHER DHCP SERVER ON THE NETWORK assigns the ultimate address.

@tlumko
tlumko / audit-log.js
Created August 27, 2018 13:06
Node sequelize audit log
const AuditLog = auditLogDb.define('audit-log', {
userId: {
type: Sequelize.DataTypes.INTEGER,
allowNull: true,
},
actionType: {
type: Sequelize.DataTypes.STRING,
allowNull: false,
},
table: {
@technoknol
technoknol / Enable CORS in Laravel 5.4.php
Created April 26, 2017 14:10
Enable CORS in laravel 5.4
<?php
# File: app\Http\Middleware\CORS.php
# Create file with below code in above location. And at the end of the file there are other instructions also.
# Please check.
namespace App\Http\Middleware;
use Closure;
class CORS {
@jdeathe
jdeathe / centos-certbot.md
Last active December 4, 2019 08:30
Installation and Usage of Certbot on CentOS to obtain a Let’s Encrypt TLS/SSL certificate.

Installation and Usage of Certbot on CentOS

Installation

Install certbot-auto

# mkdir -p /opt/{bin,certbot/bin} \
  && curl -sS \
 -o /opt/certbot/bin/certbot-auto \
@harryfinn
harryfinn / letsencrypt-wordpress-setup.md
Last active November 12, 2023 10:21
Instructions on how to setup a Letsencrypt SSL certificate on a WordPress site

Letsencrypt (for WordPress sites)

Note: This setup assumes you are running Ubuntu 16.04 OS with Apache 2.4.23, older versions of Ubuntu (i.e. 14.04) require minor configuration changes in order for this setup to work.

Setup

Follow the install instructions for certbot (letsencrypt's SSL manager) on https://certbot.eff.org/, making sure to select the correct server OS version.

Note: You only need to complete the Install section, then return to this README in order to setup your SSL

@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active March 18, 2024 09:08
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@tao
tao / gist:fba880299bdfdcfd491582724ede9dd7
Last active September 11, 2023 14:29
Using Passport with Laravel Spark
# Installation
As far as I know this is how to get Passport on Laravel Spark working correctly, it works so far for me over the API but there might be something I am still missing.
I am using the following software versions in composer.json:
```
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
@hfalucas
hfalucas / [1] main.js
Last active March 13, 2024 05:49
[Vue.js] Authentication and Authorization
/**
* Think of this "main.js" file as your application bootstrap.
*/
import Vue from 'vue'
import Resource from 'vue-resource'
import VueRouter from 'vue-router'
import routes from './routes'
import middleware from './middleware'
@dillinghamio
dillinghamio / Laravel Spark Per Team User Subscription.md
Last active April 22, 2022 14:57
Per Team User Subscription in Laravel Spark

Per Team User Subscription in Laravel Spark

If you want the ability to charge a team owner based on how many members their team has, like $10/user/month, then you utilize the Laravel Cashier functionality of incrementing the quantity.

You listen for when a new team member is added and you increase the quantity of the subscription by the amount of users and also listen for when a team member is removed to downsize charges. - Not Braintree Compatible


Within EventServiceProvider.php
'Laravel\Spark\Events\Teams\TeamMemberAdded' => [