Skip to content

Instantly share code, notes, and snippets.

View miadz's full-sized avatar
🏠
Working from home

miad z miadz

🏠
Working from home
View GitHub Profile
@miadz
miadz / phpstorm-auto-semicolon-macro.txt
Last active August 29, 2015 14:25 — forked from umidjons/phpstorm-auto-semicolon-macro.txt
PhpStorm: Record Auto semicolon macro and bind shortcut to it
Record Auto semicolon macro and bind shortcut to it:
1. Edit -> Macros -> Start Macro Recording
2. In the editor go to the end of line by pressing End
3. put semicolon ';'
4. Edit -> Macros -> Stop Macro Recording
5. Give a name, for example 'Auto semicolon'
6. Open settings (Ctrl + Alt + s), select Keymap
7. Expand Macros node
8. Select 'Auto semicolon', in the context menu choose Add Keyboard Shortcut
9. Set Ctrl + ; as First keystroke
@miadz
miadz / laravel-ums.markdown
Last active August 29, 2015 14:26 — forked from anchetaWern/laravel-ums.markdown
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@miadz
miadz / 0_reuse_code.js
Created March 23, 2016 23:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@miadz
miadz / Kernel.php
Created May 2, 2016 11:20 — forked from davidrushton/Kernel.php
Laravel 5 Database Queue - Shared Hosting
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@miadz
miadz / QueueRetryAllCommand.php
Created May 10, 2016 22:11 — forked from JacobBennett/QueueRetryAllCommand.php
Laravel Queue:Retry-Multiple and Queue:Retry-All
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class RetryAllCommand extends Command
{
/**
* The name and signature of the console command.
@miadz
miadz / gist:4606774028ec8d886953668f6811b618
Created September 18, 2016 15:38
CefSharp OffScreen Async Load
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using CefSharp.Example;
@miadz
miadz / keyboard-event-trigger.js
Created November 20, 2016 13:07 — forked from boazsender/keyboard-event-trigger.js
Dispatch a keyboard
/*
Chrome does not let you modify the keyCode prop when you trigger it, so it defaults to 0.
You can use this code to trigger a keydown with a char code of 0 in chrome.
If you use initKeyEvent instead of initKeyboardEvent, it will work in FF
(the bellow example would trigger keydown with a char code of 65 in FF).
*/
document.addEventListener( 'keydown', function( event ){
console.log( event.keyCode )
@miadz
miadz / chrome.md
Created November 23, 2016 23:58 — forked from 0xjjpa/chrome.md
Understanding Google Chrome Extensions

#Introduction

Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.

Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.

Table of Contents

  1. Understand the Chrome Architecture
  2. Understand the Tabs-Extension Relationship
  3. Picking the right interface for the job
@miadz
miadz / app.rb
Created November 28, 2016 01:39 — forked from will3942/app.rb
Reverse-Engineering Instagram
require 'openssl'
require 'base64'
require 'json'
require 'httpclient'
http = HTTPClient.new(:agent_name => useragent)
key = "" #The Private key
login_info = {:guid => "00000000-0000-0000-0000-000000000000",
:password => "PASSWORD",
:username => "USERNAME",
@miadz
miadz / js-crypto-libraries.md
Created December 2, 2016 12:40 — forked from jo/js-crypto-libraries.md
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

I start with a list and plan to create a comparison table.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.