These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: set swap_file variable | |
set_fact: | |
swap_file: /mnt/{{ swap_space }}.swap | |
- name: check if swap file exists | |
stat: | |
path: "{{ swap_file }}" | |
register: swap_file_check | |
- name: create swap file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Brightness math based on: | |
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx | |
$red-magic-number: 241; | |
$green-magic-number: 691; | |
$blue-magic-number: 68; | |
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number; | |
@function brightness($color) { | |
// Extract color components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import SimpleHTTPServer | |
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_my_headers() | |
SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) | |
def send_my_headers(self): | |
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate") |