start new:
tmux
start new with session name:
tmux new -s myname
| <html i18n-values="dir:textdirection;lang:language" dir="ltr" lang="en"><head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, | |
| maximum-scale=1.0, user-scalable=no"> | |
| <title i18n-content="title">T-Rex Game</title> | |
| <style>/* Copyright 2014 The Chromium Authors. All rights reserved. | |
| Use of this source code is governed by a BSD-style license that can be | |
| found in the LICENSE file. */ | |
| a { |
| #!/usr/bin/env ruby | |
| require 'appscript' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'clipboard' | |
| url = ARGV.length >= 1 ? ARGV[0] : Clipboard.paste | |
| def zhihu(doc) |
| var React = require('react'); | |
| var EventListener = require('react/lib/EventListener'); | |
| var partition = require('linear-partitioning'); | |
| var TileLayout = React.createClass({ | |
| getDefaultProps: function() { | |
| return { | |
| gutter: 0, | |
| photos: [] | |
| } |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| function findKey(obj, value){ | |
| var key; | |
| _.each(_.keys(obj), function(k){ | |
| var v = obj[k]; | |
| if (v === value){ | |
| key = k; | |
| } | |
| }); |
| // Usage: | |
| // | |
| // 1. Put this in the file that gets first loaded by RequireJS | |
| // 2. Once the page has loaded, type window.rtree.map() in the console | |
| // This will map all dependencies in the window.rtree.tree object | |
| // 3. To generate UML call window.rtree.toUml(). The output can be used | |
| // here: http://yuml.me/diagram/scruffy/class/draw | |
| requirejs.onResourceLoad = function (context, map, depMaps) { | |
| if (!window.rtree) { | |
| window.rtree = {}; |
adapted from this blog
# YAML
name: Jon# YAML
object:#File Magic Numbers
Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.
For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.
This gives an ongoing list of file-type magic numbers.
##Image Files
| #!/bin/bash | |
| # Reads EXIF creation date from all .JPG files in the | |
| # current direcotry and moves them carefully under | |
| # | |
| # $BASEDIR/YYYY/YYYY-MM/YYYY-MM-DD/ | |
| # | |
| # ...where 'carefully' means that it does not overwrite | |
| # differing files if they already exist and will not delete | |
| # the original file if copying fails for some reason. |