First, create a helper folder
$ mkdir app/Helpers
Then create helper files, in my case I create route helper
import requests | |
import pprint | |
INSTAGRAM_URL = 'https://www.instagram.com' | |
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36' | |
IG_ACCOUNTS = [ | |
{'username': 'username1', 'password': 'pass1'}, | |
{'username': 'username2', 'password': 'pass2'}, | |
] |
import time | |
import re | |
from hashlib import md5 | |
import requests | |
INSTAGRAM_URL = "https://www.instagram.com" | |
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" | |
INSTAGRAM_USER = "youruname" | |
INSTAGRAM_PASS = "yoursecret" |
#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.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
<?php | |
/** | |
* Refer: https://stackoverflow.com/questions/14961556/convert-one-dimensional-array-into-a-multi-dimensional-array/14963016#14963016 | |
* | |
* @param mixed $menu_items | |
* @param int $depth | |
* @access public | |
* @return array | |
*/ | |
function array_multi_level($menu_items, $depth = 1) { |
$ svn st | grep -v '^?' | awk '{print $2}' | grep "keyword" | xargs svn commit -m "- commit message" |