Create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
Create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
#!/bin/bash | |
echo "Please enter the source repository you want to move" | |
read SOURCE_REPOS | |
echo "Please enter the target repsitory that you want to move the repos" | |
read TARGET_REPOS | |
git clone --bare $SOURCE_REPOS | |
SOURCE_GIT_META_DIR=$(basename $SOURCE_REPOS) | |
cd $SOURCE_GIT_META_DIR && git push --mirror $TARGET_REPOS && cd .. && rm -rf $SOURCE_GIT_META_DIR |
<?php | |
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |
use LaunchCMS\Utils\SerializeUtil; | |
abstract class LaunchEloquentModel extends Eloquent implements \Serializable | |
{ | |
protected $connection = 'mongodb'; | |
protected $array_fields = []; | |
public function serialize() | |
{ |
#It helps to add ClientAliveInterval of 60 mins into SSH config | |
sudo echo 'ClientAliveInterval 60' >> /etc/ssh/sshd_config | |
#Then, restart SSH | |
#Below is the command to restart ssh on Ubuntu based | |
sudo service ssh restart | |
#Other Linux distribution | |
sudo service sshd restart |
UPDATE wp_users SET user_pass = MD5('new_password') WHERE ID='id_of_the_user_to_reset_password' LIMIT 1; |
var Analytic = (function(){ | |
var module = {}; | |
var trackEventOfElement = function(el) { | |
var category = el.attr('data-category'); | |
var action = el.attr('data-action'); | |
var label = el.attr('data-label'); | |
var value = el.attr('data-value'); | |
module.trackEvent(category, action, label, value); | |
}; | |
var trackSocialOfElement = function(el) { |
server { | |
listen 80; | |
server_name website-domain.com; | |
root /data/apps/excitingthing; | |
index index.html index.htm index.php; | |
charset utf-8; | |
set $skip_cache 0; | |
# POST requests and urls with a query string should always go to PHP | |
if ($request_method = POST) { | |
set $skip_cache 1; |
git branch -r --merged | grep -v '\*\|master\|dev\|DTP-263' | sed 's/origin\///' | xargs -n 1 git push --delete origin | |
#The syntax to put branch to keep: \|branch-name |
use App; | |
use October\Rain\Support\ModuleServiceProvider; | |
class ServiceProvider extends ModuleServiceProvider | |
{ | |
/** | |
* Register the service provider. | |
* | |
* @return void |