start new:
tmux
start new with session name:
tmux new -s myname
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
##Google Interview Questions: Product Marketing Manager
| import PIL | |
| from PIL import Image, ImageOps | |
| def resizecrop(src, out, width, height): | |
| img = Image.open(src) | |
| img = ImageOps.fit(img, (width, height), Image.ANTIALIAS, 0, (0.5, 0.5)) | |
| img.save(out) |
| // Created by STRd6 | |
| // MIT License | |
| // jquery.paste_image_reader.js | |
| (function($) { | |
| var defaults; | |
| $.event.fix = (function(originalFix) { | |
| return function(event) { | |
| event = originalFix.apply(this, arguments); | |
| if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) { | |
| event.clipboardData = event.originalEvent.clipboardData; |
| package main | |
| import ( | |
| "fmt" | |
| "net/url" | |
| "reflect" | |
| "strconv" | |
| ) | |
| type Person struct { |
| #include <assert.h> | |
| #include <sys/types.h> | |
| #include <dirent.h> | |
| #include "lwan-status.h" | |
| #include "lwan-template.h" | |
| #include "strbuf.h" | |
| struct file_list { | |
| const char *path; |
| sudo grub2-mkconfig -o /boot/grub2/grub.cfg |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| window.onload = init; | |
| var context; | |
| var bufferLoader; | |
| var offline; | |
| function init() { | |
| // Fix up prefixing | |
| window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
| context = new AudioContext(); | |
| bufferLoader = new BufferLoader( |