- Login to server
- Run
wget https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz
. Also check the urlhttps://github.com/cdr/code-server/releases
for latest version. - Run
tar -xzvf code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz
- Run
cd code-server2.1698-vsc1.41.1-linux-x86_64
- Run
sudo mv ./code-server /usr/local/bin
- Run
code-server
and you will get a one time password. Visit http://server-ip-address:8080 and use the password to login.
This file contains hidden or 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 | |
/** | |
* Rules we follow are from PSR-2 as well as the rectified PSR-2 guide. | |
* | |
* - https://github.com/FriendsOfPHP/PHP-CS-Fixer | |
* - https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md | |
* - https://github.com/php-fig-rectified/fig-rectified-standards/blob/master/PSR-2-R-coding-style-guide-additions.md | |
* | |
* If something isn't addressed in either of those, some other common community rules are |
This file contains hidden or 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
var finalEnlishToBanglaNumber={'0':'০','1':'১','2':'২','3':'৩','4':'৪','5':'৫','6':'৬','7':'৭','8':'৮','9':'৯'}; | |
String.prototype.getDigitBanglaFromEnglish = function() { | |
var retStr = this; | |
for (var x in finalEnlishToBanglaNumber) { | |
retStr = retStr.replace(new RegExp(x, 'g'), finalEnlishToBanglaNumber[x]); | |
} | |
return retStr; | |
}; | |
This file contains hidden or 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
server { | |
listen 80; | |
root /path-to-your-project/public; | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name example.local admin.example.local partner.example.local; | |
location / { |
This file contains hidden or 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 copyToClipboard(value) { | |
var tempInput = document.createElement("textarea"); | |
tempInput.style = "position: absolute; left: -1000px; top: -1000px"; | |
tempInput.value = value; | |
document.body.appendChild(tempInput); | |
tempInput.select(); | |
document.execCommand("copy"); | |
document.body.removeChild(tempInput); | |
} |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
This file contains hidden or 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
#!/usr/bin/env perl | |
# This program is part of Percona Toolkit: http://www.percona.com/software/ | |
# See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for legal | |
# notices and disclaimers. | |
use strict; | |
use warnings FATAL => 'all'; | |
# This tool is "fat-packed": most of its dependent modules are embedded |
This file contains hidden or 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 | |
class MyModel extends Eloquent { | |
public function getSql() | |
{ | |
$builder = $this->getBuilder(); | |
$sql = $builder->toSql(); | |
foreach($builder->getBindings() as $binding) | |
{ |
This file contains hidden or 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 get_avatar_from_service(service, userid, size) { | |
// this return the url that redirects to the according user image/avatar/profile picture | |
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
// everything else will go to the fallback | |
// google and gravatar scale the avatar to any site, others will guided to the next best version |
This file contains hidden or 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 | |
// For more details see: http://laraget.com/blog/implementing-infinite-scroll-pagination-using-laravel-and-jscroll | |
namespace App\Http\Controllers\InfiniteScrolling; | |
use App\Comment; | |
use Illuminate\Http\Request; | |
use App\Http\Requests; | |
use App\Http\Controllers\Controller; |
NewerOlder