Skip to content

Instantly share code, notes, and snippets.

View Joseph7451797's full-sized avatar

Joseph Chang Joseph7451797

View GitHub Profile
@Joseph7451797
Joseph7451797 / server.js
Created April 17, 2018 03:28
Simple static asset server powered by Node.js http server
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const port = process.argv[2] || 9000;
http.createServer(function (req, res) {
console.log(`${req.method} ${req.url}`);
// parse URL
.postList {
height: 100px;
background: #dfdfdf;
border: 1px solid #333;
}
.loadReplysAnimate {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</head>
<body>
@Joseph7451797
Joseph7451797 / tmux-cheatsheet.markdown
Created February 8, 2017 13:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
var EXIF = require('exif-js');
var $input = $('#uploadImage');
function base64ToArrayBuffer (base64) {
base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
var binaryString = atob(base64);
var len = binaryString.length;
var bytes = new Uint8Array(len);
for (var i = 0; i < len; i++) {
bytes[i] = binaryString.charCodeAt(i);
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="ccc">clicktoserial</div>
<div id="ddd">clicktorandom</div>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="img-wrapper"></div>
<script id="jsbin-source-javascript" type="text/javascript">
div {
display: block;
}