Skip to content

Instantly share code, notes, and snippets.

View wastemobile's full-sized avatar

wastemobile wastemobile

View GitHub Profile
@peregrinogris
peregrinogris / make-leanpub.py
Created August 18, 2016 14:04
Build a leanpub book source to epub, using pandoc
with open("Book.txt") as f:
print ('echo "Starting build of {book}.epub";'
"pandoc {files} " +
"--smart --table-of-contents --chapters -o {book}.epub;"
'echo " {book}.epub created."'
).format(book="Book", files=f.read().replace("\n", " "))
@noelboss
noelboss / git-deployment.md
Last active October 12, 2024 16:09
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@abhiaiyer91
abhiaiyer91 / gist:434a98d314ac175c0d2a
Last active February 10, 2016 15:39
Proposed 2 factor login
// Two Factor
TwoFactor = new Meteor.Collection('twoFactor');
//generate login token
var generateLoginToken = function () {
var stampedToken = Accounts._generateStampedLoginToken();
return [
stampedToken,
Accounts._hashStampedToken(stampedToken)
];
@wastemobile
wastemobile / kickstart
Created January 10, 2014 17:11
一個極簡的起手式,使用LESS,具備Vertical Rhythm設計。
/* Vars */
@font-size: 16px;
@vertical-rhythm: @font-size * 1.5;
@fontstack1: sans-serif; /* Headings */
@fontstack2: Georgia, serif; /* Body copy */
@color1: #20bd7c; /* Main theme colour colour */
@color2: #333; /* headings */
@wastemobile
wastemobile / bash_profile
Last active December 30, 2015 22:09
Install Node。在 Mac 上使用 homebrew 安裝 node 雖然方便,但後續更新與使用 npm 安裝與升級套件時會遇到問題,實際原因是來自于目錄權限。要不是使用時必須帶著 sudo,要不就是得修改部分目錄權限,兩者都不太好。下面的安裝程序可以避掉。
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
function git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
echo "("${ref#refs/heads/}") ";
}
function git_since_last_commit {
@hanksudo
hanksudo / Front-end-Developer-Interview-Questions-TC.md
Last active September 12, 2024 07:05
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@takahashim
takahashim / mindoc-core.rnc
Created May 29, 2012 07:49
mindoc coreフォーマット定義案 (RelaxNG Compact形式)
# mindoc core (draft v0.1)
#
# mindoc(minimal document material description language)(仮)とは、文書素材を記述するための言語で、
# 一般的な書籍のための文字情報を記述するために必要最低限な要素すら網羅していない、単なる素材程度のものしか
# 記述できない・記述させない言語です。その代わり、さまざまなフォーマットへの変換・逆変換は行いやすくなって
# います(はずです。また逆変換は要素を削るので「縮退」と言った方がいいかも)。
#
# このmindoc coreは電子書籍交換フォーマットv1.1のだいたいサブセットになっています(はずです)。
# 名前空間は別にしましたが。
@ttscoff
ttscoff / scrivwatcher.rb
Created January 25, 2012 15:05
Watch a Scrivener project for changes and update Marked.app
#!/usr/bin/ruby
# scrivwatch.rb by Brett Terpstra, 2011
# Modifications to merge into one file for Markdown viewing in Marked by BooneJS, 2012
# Modified to use REXML and add titles by Brett Terpstra, 2012 <https://gist.github.com/1676667>
#
# Watch a Scrivener project for changes and update a preview file for Marked
# Usage: scrivwatch.rb /path/to/document.scriv
# <http://markedapp.com>
require 'fileutils'
@liuwen-lvtu
liuwen-lvtu / tutorial.mkdn
Created October 18, 2011 03:19 — forked from mirisuzanne/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems