Skip to content

Instantly share code, notes, and snippets.

@zealinux
zealinux / shebang.zsh
Created January 16, 2017 13:53 — forked from gwerbin/shebang.zsh
"Shebang" function for Zsh
# shebang [-iv] [-t interpreter] [-I extension] [-J [extension]] [filename]
#
# If no filename is given, print a shebang. If a filename is given, append a shebang to the file and print its contents. If a filename is given and the -I or -J options are specified, append a shebang to the file in place.
#
# OPTIONS
# -i
# Interactive mode; ask for confirmation first.
# -I
# Modify "filename" in place (as in `sed -i`) using specified extension. Extension is mandatory.
# -J
@zealinux
zealinux / Dockerfile
Created December 6, 2016 09:11 — forked from renatosousafilho/Dockerfile
Deploy com Mina, Docker e Docker Compose
FROM rails:4.2.3
MAINTAINER Renato Filho <[email protected]>
ENV HOME /home/app
ENV RAILS_ENV development
RUN useradd -m -s /bin/bash app
RUN gem install -N bundler
@zealinux
zealinux / gist:db7d9962bebd23b733f27a014cdeded7
Created December 3, 2016 13:14 — forked from hzlzh/gist:eb87294712e78d4a96c4
Proxifier 走代理程序请求规则
"Alfred 2"; idea;Thunder*; iTerm; Terminal;php; Dropbox; Sparrow; "Sequel Pro"; python; ruby; wget; curl; GitHub; git-remote-https; npm; node; perl;prl*;itunes; sftp; whois;traceroute;stroke;ssh;ALiWangwang;MacUpdate*;git*;Git;fzs*;mail;flickr*;xulr*;imess*;com.apple.im*;Airmail;Adium;Prot*;Tokens;Ali*;Lite*;file*;ssh;ftp;Adobe*;PDApp*;Creative*;Vbox*;xulrunner;Virtual*;PDApp;Bit*;Domainers;fire*;plugin*;Atom*;Tokens;.com.realmacsoftware*;Xcode;java;httpd;
@zealinux
zealinux / org-structure-as-dirs-and-files.el
Created November 20, 2016 15:29 — forked from marcowahl/org-structure-as-dirs-and-files.el
org-save-org-structure-as-dir-file-skeleton to save the org structure as dirs and files (marked with tag :file:)
(defun org-interpret-org-as-dir-file-skeleton ()
"Return the outline paths as lists.
Separated in those headlines not tagged 'file' and those tagged with 'file'."
(let (output-files output-dirs)
(org-map-entries
(lambda ()
(let* ((headline (car (cddddr (org-heading-components))))
(headline-path
(reverse
(cons

前端工程师-开放性笔试

1. HTML / CSS

以下三个效果图中任选一个,尽可能还原。(不限框架,工具,预编译语言)

点击查看大图

兼容性要求:Chrome / Firefox / IE 11 / Edge

其他:部署至jsfiddle / jsbin / github page或同类网站

@zealinux
zealinux / make-flashlight-work-on.yosemite.md
Created February 15, 2016 06:38 — forked from selaromi/make-flashlight-work-on.yosemite.md
Steps to make Flashlight work on 10.10.4 (doesn't work for El Capitan)

Make Flashlight work on 10.10.4

  1. Install SIMBL http://culater.net/software/SIMBL/SIMBL.php
  2. Copy SpotlightSIMBL.bundle to /Library/Application Support/SIMBL/Plugins/ (a)
  3. Copy Flashlight.osax to ~/Library/ScriptingAdditions/ (b)
  4. Disable Flashlight
  5. Enable Flashlight
  6. Open Script Editor on your Mac (look for "Script Editor In Spotlight") and paste the following code (don't change Snow Leopard for Yosemite)
tell application "Spotlight" to inject SIMBL into Snow Leopard
@zealinux
zealinux / install_ruby_2_0_0_p247_on_osx.md
Created November 30, 2015 06:11 — forked from runlevel5/install_ruby_2_0_0_p247_on_osx.md
Installing Ruby 2.0.0-p247 on OSX 10.7+

How to install Ruby 2.0.0-p247 on Mac OSX 10.7+

RVM:

rvm get stable && rvm reload

Firstly, the OpenSSL comes with your OSX 10.7+ is outdated, you need to get latest version

@zealinux
zealinux / multiple_ssh_setting.md
Created November 18, 2015 00:31 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@zealinux
zealinux / vine_to_gif.rb
Created November 13, 2015 13:54 — forked from seyhunak/vine_to_gif.rb
Vine.co mp4 to GIF using Ruby
# space150 vine-to-GIF
# given a vine.co uri, downloads the MP4 and creates an image sequence / GIF from it
# requires ruby, ffmpeg, and imagemagick
require 'open-uri'
require 'nokogiri'
id = ARGV[0]
# try to convert from URL to id.
@zealinux
zealinux / css_resources.md
Created January 21, 2014 03:40 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides