Skip to content

Instantly share code, notes, and snippets.

@rkalkani
rkalkani / gitlab-backup.md
Created February 15, 2023 11:29 — forked from nikvdp/gitlab-backup.md
Back up GitLab to GitHub

Backup your GitLab repos to GitHub

GitLab recently decided to silently delete any repositories that hadn't been accessed in the last year. The announcement didn't go over well and they soon caved to public pressure and decided to instead back up inactive repos to object storage instead of unilaterally deleting them. I'm glad they reconsidered, but the experience left me with a bad taste in my mouth, so I decided to look into (relatively) low

@rkalkani
rkalkani / app.js
Created August 27, 2021 12:19 — forked from moso/app.js
laravel-mix config
// jQuery import
global.jQuery = require('jquery');
var $ = global.jQuery;
window.$ = $;
// Bootstrap 4 depends on Popper.js
// Popper.js import
//import Popper from 'popper.js';
//window.Popper = Popper;
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@rkalkani
rkalkani / dot-notation-object.js
Created July 18, 2016 11:11 — forked from likerRr/dot-notation-object.js
Adding string with dot-notation as a key to JavaScript objects
// Be careful when changing Object's prototype to avoid overwriting of methods
if (Object.prototype.setPath === undefined && Object.prototype.getPath === undefined) {
Object.prototype.setPath = function (path, value, notation) {
function isObject(obj) { return (Object.prototype.toString.call(obj) === '[object Object]' && !!obj);}
notation = notation || '.';
path.split(notation).reduce(function (prev, cur, idx, arr) {
var isLast = (idx === arr.length - 1);
// if <cur> is last part of path
if (isLast) return (prev[cur] = value);
@rkalkani
rkalkani / 01_Laravel 5 Simple ACL manager_Readme.md
Created May 30, 2016 04:48 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@rkalkani
rkalkani / gist:23b5eed7e610ac414296
Created February 7, 2016 08:34 — forked from eligrey/gist:1079572
BlobBuilder.js