git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<?php | |
/** | |
* Dominant colours by k means derived from code by Charles Leifer at: | |
* http://charlesleifer.com/blog/using-python-and-k-means-to-find-the-dominant-colors-in-images/ | |
* | |
* MagickWand docs: http://www.magickwand.org/ | |
* | |
* Color transformation algorithms from EasyRGB: http://easyrgb.com/ | |
* |
<?php | |
class Crypt { | |
private $key; | |
function __construct($key){ | |
$this->setKey($key); | |
} |
// put this in your AppDelegate | |
- (void)changeRootViewController:(UIViewController*)viewController { | |
if (!self.window.rootViewController) { | |
self.window.rootViewController = viewController; | |
return; | |
} | |
UIView *snapShot = [self.window snapshotViewAfterScreenUpdates:YES]; | |
[viewController.view addSubview:snapShot]; | |
self.window.rootViewController = viewController; |
// | |
// main.m | |
// ER1 | |
// | |
// Created by @zaersk_ on 7/19/14. | |
// Copyright (c) 2014 Zaersk. All rights reserved. | |
// | |
// Attempt to login to Instagram using their unofficial API (no OAuth tokens). | |
#import <Foundation/Foundation.h> |
## | |
# git hook to run a command after `git pull` for laravel by @abdu1m | |
## | |
# source: https://gist.github.com/sindresorhus/7996717 | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} |
-1- edit ~/.composer/vendor/laravel/valet/cli/stubs/openssl.conf | |
Change: | |
basicConstraints = CA:FALSE | |
To: | |
basicConstraints = CA:TRUE,pathlen:0 | |
save file. |
Laravel 8+, Horizon 5.x, Redis 6+
Parepare application
http://yourapp.com/horizon
inactive
on horizon dashbaordInstall redis-server
function slugify(text) { | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') | |
.replace(/[^\w\u0621-\u064A0-9-]+/g, '') | |
.replace(/\-\-+/g, '-') | |
.replace(/^-+/, '').replace(/-+$/, ''); | |
} |
Hi all, recently I've decided to move on and learn Python programming. At first, I though that it would be very difficult but in fact... Not that much. So I've decided to write this little gist and show the main differences between both languages.
I will use try to follow the same order used on this website: https://pythonprogramming.net/introduction-to-python-programming/. It was really usefull to improve my understanding of Python programming.
To finish, I'm assuming that you already got basic knowledge in Object Oriented Programming and already got skills and understanding of PHP programming. This is not intended to explain you how to code in PHP but if you're coming from Python programming, then this gist might help you to migrate from Python to PHP.