Skip to content

Instantly share code, notes, and snippets.

View KABBOUCHI's full-sized avatar
🎯
Focusing

Georges KABBOUCHI KABBOUCHI

🎯
Focusing
View GitHub Profile
@KABBOUCHI
KABBOUCHI / BatchBuilderSettings.cs
Created September 1, 2018 15:02 — forked from msklywenn/BatchBuilderSettings.cs
Unity Batch Builder
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Version 2, December 2004
//
// Copyright (C) 2004 Sam Hocevar <[email protected]>
//
// Everyone is permitted to copy and distribute verbatim or modified
// copies of this license document, and changing it is allowed as long
// as the name is changed.
//
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@KABBOUCHI
KABBOUCHI / NoVNC_Paste.js
Created April 3, 2018 21:45 — forked from byjg/NoVNC_Paste.js
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/);
@KABBOUCHI
KABBOUCHI / forge_deploy.sh
Created March 17, 2018 01:40 — forked from pmatseykanets/forge_deploy.sh
Forge Deploy script
APP_DIR=/home/forge/sub.domain.com
RELEASE=$(date +%Y%m%d%H%M%S)
RELEASE_DIR=$APP_DIR/releases/$RELEASE
ARCHIVE=$RELEASE.tar.gz
PHP=php7.1
[ -d $APP_DIR/releases ] || mkdir $APP_DIR/releases
cd $APP_DIR/releases
mkdir $RELEASE_DIR
@KABBOUCHI
KABBOUCHI / forge.sh
Created March 17, 2018 01:37
Laravel Forge Setup Script
#
# REQUIRES:
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
#
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
<template>
<form @submit.prevent="onSubmit">
<b-field label="Email"
:message="formErrors.first('email')"
:type="formErrors.has('email') ? 'is-warning' : ''">
<b-input type="email"
name="email"
@input="clearErrors"
v-model="formData.email"
v-validate="{required: true, email: true}">
@KABBOUCHI
KABBOUCHI / tailwind_md_all_colours.js
Created February 14, 2018 17:22 — forked from davidpiesse/tailwind_md_all_colours.js
A colour set for Tailwind CSS that include all Material Design Colours, shades, accents and contrast colours
// https://davidpiesse.github.io/tailwind-md-colours/
//
//Notes
//
//All colours are generated from Material Design Docs
//Colours have a base, a set of shades (50-900) accent colours
//In addition a companion set of contrast colours are included for colouring text / icons
// Example usage
// class="w-full bg-red-600 text-red-600-constrast"
@KABBOUCHI
KABBOUCHI / letsencrypt_2017.md
Created January 17, 2018 23:33 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.