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 / JSONEditor.cs
Created September 10, 2017 12:17 — forked from paullj/JSONEditor.cs
A JSON Editor in the inspector. Preview and more information in comments 🙂
using System.IO;
using System.Linq;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEditor;
using System;
@KABBOUCHI
KABBOUCHI / bulma.blade.php
Created September 8, 2017 18:16 — forked from tompec/bulma.blade.php
Bulma blade template for Laravel 5.4 pagination
@if ($paginator->hasPages())
<nav class="pagination is-centered">
@if ($paginator->onFirstPage())
<a class="pagination-previous" disabled>Previous</a>
@else
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="pagination-previous">Previous</a>
@endif
@if ($paginator->hasMorePages())
<a class="pagination-next" href="{{ $paginator->nextPageUrl() }}" rel="next">Next</a>
@KABBOUCHI
KABBOUCHI / sluggenerator.cs
Created July 10, 2017 20:11 — forked from paracycle/sluggenerator.cs
Slug Generator - C# - String Extension Method
/// <summary>
/// Generates a permalink slug for passed string
/// </summary>
/// <param name="phrase"></param>
/// <returns>clean slug string (ex. "some-cool-topic")</returns>
public static string GenerateSlug(this string phrase)
{
var s = phrase.RemoveAccent().ToLower();
s = Regex.Replace(s, @"[^a-z0-9\s-]", ""); // remove invalid characters
s = Regex.Replace(s, @"\s+", " ").Trim(); // single space
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/weather-deploy" ]; then
rm -R /home/forge/weather-deploy
fi
if [ -d "/home/forge/weather-backup" ]; then
rm -R /home/forge/weather-backup
fi
@KABBOUCHI
KABBOUCHI / toggle-menu.js
Created May 27, 2017 21:06 — forked from Bradcomp/toggle-menu.js
Toggles the .is-active class for a hamburger menu
(function() {
var burger = document.querySelector('.nav-toggle');
var menu = document.querySelector('.nav-menu');
burger.addEventListener('click', function() {
burger.classList.toggle('is-active');
menu.classList.toggle('is-active');
});
})();
@KABBOUCHI
KABBOUCHI / WebhooksController.php
Created February 27, 2017 22:45 — forked from benluxford/WebhooksController.php
Stripe Webhook Controller with Event Checking for Laravel 5; based on Laracasts lesson - How to Accept Payments: Cleaner Webhook Management: https://laracasts.com/series/how-to-accept-payments-with-stripe/episodes/10 ... Thanks to @JeffreyWay @laracasts @taylorotwell @laravel
<?php
namespace App\Http\Controllers;
use Stripe\Stripe;
use Stripe\Event;
use Illuminate\Http\Request;
class WebhooksController extends Controller
{