Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
// A thing I want to do | |
// This flow only involves **one** promise, for example an ajax call | |
// None of the subsequent `then` or `catch` calls, return new promises. | |
var explode = false; | |
var promise = new Promise(function(resolve, reject) { | |
if (explode) { |
import React, {Component, PropTypes} from 'react'; | |
import './COMPONENT.scss'; | |
class COMPONENT extends Component { | |
render() { | |
const block = 'COMPONENT'; | |
return ( | |
<div className={`${block}`}></div> |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
(require 'ht) | |
(require 'web) | |
(require 'dash) | |
(defun my-emacs-douban-play () | |
(interactive) | |
(web-http-get | |
(lambda (con header data) | |
;; local variables | |
(let* ((json (ht<-alist (json-read-from-string data))) |
const fs = require('fs'); | |
const path = require('path'); | |
const exec = require('child_process').exec; | |
const filename = path.resolve(__dirname, 'index.css'); | |
fs.readFile(filename, 'utf8', (err, data) => { | |
if (err) throw err; | |
var reg = new RegExp(/'([a-zA-z_0-9]+(?:.jpg|.png))'/, 'g'); |
function s4() { | |
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | |
}; | |
function guid() { | |
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | |
s4() + '-' + s4() + s4() + s4(); | |
}; | |
function guid20() { |
# https://laracasts.com/discuss/channels/envoyer/envoyer-inspired-envoy-script | |
rm -rf `ls -dt {{project}}/releases/* | tail -n +6`; |
// dashboard component | |
var dashboard = Vue.extend({ | |
template: '<p>Hello from dashboard</p>' | |
}) | |
// user management component | |
var user = Vue.extend({ | |
template: '<p>Hello from user management page</p>' | |
}) |
(setq fonts | |
(cond ((eq system-type 'darwin) '("Monaco" "STHeiti")) | |
((eq system-type 'gnu/linux) '("Menlo" "WenQuanYi Zen Hei")) | |
((eq system-type 'windows-nt) '("Consolas" "Microsoft Yahei")))) | |
(set-face-attribute 'default nil :font | |
(format "%s:pixelsize=%d" (car fonts) 14)) | |
(dolist (charset '(kana han symbol cjk-misc bopomofo)) | |
(set-fontset-font (frame-parameter nil 'font) charset | |
(font-spec :family (car (cdr fonts))))) | |
;; Fix chinese font width and rescale |