Skip to content

Instantly share code, notes, and snippets.

View Troland's full-sized avatar
🎯
Focusing

Tris Roland Troland

🎯
Focusing
  • China
View GitHub Profile

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@Troland
Troland / media-query.css
Created December 10, 2018 13:11 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@Troland
Troland / moment-locale-resolver.js
Created January 28, 2019 09:04 — forked from fabulator/moment-locale-resolver.js
Resolve best locale for moment
import moment from 'moment';
import {
LocaleResolver,
NavigatorDetector,
FallbacksTransformer,
DefaultLocaleTransformer,
} from 'locales-detector';
// moment locales are in lowercase, need it change en-GB to en-gb
class LowerCaseTransformer {
@Troland
Troland / stuns
Created February 25, 2019 10:40 — forked from zziuni/stuns
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@Troland
Troland / index.md
Created May 4, 2019 14:57 — forked from SethRobertson/index.md
Commit Often, Perfect Later, Publish Once: Git Best Practices
/**
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns.
**/
// Constructor.
var Interface = function (name, methods) {
if (arguments.length != 2) {
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2.");
}
this.name = name;

Set rz and sz on Mac

There are a mess of troubles in sending and receiving files from my macbook to dev server, since I had no permission to excute command scp on dev server. Here is a lightweight, quick, and convenience tools which related with ssh, called lrzsz. lrzsz is a unix communication package providing the XMODEM, YMODEM, ZMODEM file transefer protocol which usually has been already installed in most of servers.

Prerequisites

  • iTerm2 is necessary. [Here][] is the official website.