Skip to content

Instantly share code, notes, and snippets.

@mangreen
mangreen / zsh.md
Last active August 29, 2015 14:13 — forked from tsabat/zsh.md
@mangreen
mangreen / Load local AngularJS if CDN fails
Last active August 29, 2015 14:14
JavaScript: Falling back to a local version of AngularJS if the CDN version fails to load
<!-- attempt to load AngularJS from CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
<!-- if AngularJS fails to load fallback a local version -->
<script>window.angular || document.write('<script src="assets/js/angular.min.js"><\/script>');</script>
<!-- jQuery Ver. -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
window.jQuery || document.write('<script src="../components/jquery/dist/jquery.min.js"><\/script>')
@mangreen
mangreen / app.js
Last active September 14, 2015 07:26 — forked from joshkurz/app.js
wysiHtml5 angular plugin
var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) {
$locationProvider.hashPrefix('');
});
function MainCtrl($scope, Serv) {
$scope.selectedItem = {
value: 0,
label: ''
};
$scope.Wrapper = Serv;
@mangreen
mangreen / 00.howto_install_phantomjs.md
Last active August 29, 2015 14:27 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

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
@mangreen
mangreen / Front-end-Developer-Interview-Questions-TC.md
Created November 19, 2015 16:04 — forked from hanksudo/Front-end-Developer-Interview-Questions-TC.md
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

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

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

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

/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
.animated {
/*CSS transitions*/
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
/*CSS transforms*/
@mangreen
mangreen / gist:99970124409a1cf10767
Created December 19, 2015 14:04 — forked from coodoo/gist:59891964b06a603e2dc8
react isomorphic 原理
- 我想要挑戰isomorphic,但目前好像比較少redux配isomorphic又配上webpack的方案
- 這個範例可看,最近全部改寫過
- https://github.com/coodoo/react-redux-isomorphic-example
- 注意下面幾點
- js/bootClient.js 與 js/bootServer.js
- bootServer.js 負責做 server-render
@mangreen
mangreen / gist:d9484aaa5bf623a561ca
Created January 19, 2016 13:27 — forked from bradfrost/gist:59096a855281c433adc1
Why I'm Not A JavaScript Developer

Answering the Front-end developer JavaScript interview questions to the best of my ability.

  • Explain event delegation

Sometimes you need to delegate events to things.

  • Explain how this works in JavaScript

This references the object or "thing" defined elsewhere. It's like "hey, thing I defined elsewhere, I'm talkin' to you."

  • Explain how prototypal inheritance works.
@mangreen
mangreen / install-comodo-ssl-cert-for-nginx.rst
Created August 22, 2016 04:20 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.

Requirements

OS X 10.10 (Yosemite) or newer