$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shouldTextBeBlack (backgroundcolor) { | |
return computeLuminence(backgroundcolor) > 0.179; | |
} | |
function computeLuminence(backgroundcolor) { | |
var colors = hexToRgb(backgroundcolor); | |
var components = ['r', 'g', 'b']; | |
for (var i in components) { | |
var c = components[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll start with the basics and proceed to addressing the common problems | |
faced while setting up private channels with laravel-echo & laravel-echo-server. | |
If you are getting these errors while setup; 401, 403, 419 etc, as I did in my experience. | |
this gist will help you fix these errors. | |
Although this gist addresses common problems of laravel-echo-server setup, some problems are similar with Pusher setup. | |
So it might also be useful if you're having problems with setting up Pusher with Echo. | |
I'll try to cover eveything and try to use appropriate highlighting to single out each common problem. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a sample build configuration for JavaScript. | |
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: node:8.12.0 | |
pipelines: | |
branches: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using static System.Math; | |
// Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cartesian axis. | |
// The implementation here is according to the paper: | |
// "Conversion of Geodetic coordinates to the Local Tangent Plane" Version 2.01. | |
// "The basic reference for this paper is J.Farrell & M.Barth 'The Global Positioning System & Inertial Navigation'" | |
// Also helpful is Wikipedia: http://en.wikipedia.org/wiki/Geodetic_datum |
These will directly zap your php.ini file with the settings you want.
sudo sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/7.1/fpm/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 100M/" /etc/php/7.1/fpm/php.ini
sudo sed -i "s/post_max_size = .*/post_max_size = 100M/" /etc/php/7.1/fpm/php.ini
Then, we need to set a proper client_max_body_size in the nginx.config file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
NewerOlder