| Models | Examples | 
|---|---|
| Display ads | Yahoo! | 
| Search ads | 
| #!/usr/bin/env ruby | |
| # | |
| # Proof-of-Concept exploit for Rails Unsafe Query Generation (CVE-2013-0155) | |
| # | |
| # ## Advisory | |
| # | |
| # https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/t1WFuuQyavI | |
| # | |
| # ## Synopsis | |
| # | 
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Video of this screencast: https://vimeo.com/57296525 | |
| # | |
| # | |
| from __future__ import print_function, division, absolute_import | |
| from PIL import Image as pImage | |
| import numpy | 
| # View list of connections and their states | |
| netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
| # List all connections and timers | |
| ss -rota | less | 
| data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
| <!-- | |
| For other language: Instead of `ace/mode/ruby`, Use | |
| Markdown -> `ace/mode/markdown` | |
| Python -> `ace/mode/python` | |
| C/C++ -> `ace/mode/c_cpp` | |
| Javscript -> `ace/mode/javascript` | |
| Java -> `ace/mode/java` | |
| Scala- -> `ace/mode/scala` | 
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
A slightly updated version of this doc is here on my website.
I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.
The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x), where f() is a function.
| #!/bin/bash | |
| # | |
| # Copy data from a Time Machine volume mounted on a Linux box. | |
| # | |
| # Usage: copy-from-time-machine.sh <source> <target> | |
| # | |
| # source: the source directory inside a time machine backup | |
| # target: the target directory in which to copy the reconstructed | |
| # directory trees. Created if it does not exists. | |
| # | 
| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- | 
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |