- Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
- pathname - The "file/directory" portion of the URL, like
invoices/123
- search - The stuff after
?
in a URL like/assignments?showGrades=1
. - query - A parsed version of search, usually an object but not a standard browser feature.
- hash - The
#
portion of the URL. This is not available to servers inrequest.url
so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things. - state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
- pathname - The "file/directory" portion of the URL, like
/* | |
* Simple API Sample Server | |
* | |
* Serves from file ./_data.json writing to arrays with GET, POST, PUT, PATCH, DELETE | |
* | |
* Create a _data.json file like: | |
* | |
* { | |
* "todos": [], | |
* "people": [] |
From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:
There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.
That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.
import logging | |
import time | |
from functools import wraps | |
from flask import request, jsonify | |
import redis | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
logger = logging.getLogger(__name__) |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise32" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 |
from flask import Flask, request, make_response | |
from thrift.protocol import TBinaryProtocol | |
from thrift.server import TServer | |
from thrift.transport import TTransport | |
from FooService import FooService | |
from foo_service_handler import FooServiceHandler | |
using System; | |
using System.IO; | |
using System.Threading; | |
using Microsoft.WindowsAzure; | |
using Microsoft.WindowsAzure.Diagnostics; | |
using Microsoft.WindowsAzure.ServiceRuntime; | |
using log4net; | |
using log4net.Config; | |
namespace WorkerRole |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM | |
# AND install the CloudInit.NET service, 7-zip, curl and .NET 4 if its missing. | |
# Then use the EC2 tools to create a new AMI from the result, and you have a system | |
# that will execute user-data as a PowerShell script after the instance fires up! | |
# This has been tested on Windows 2008 R2 Core x64 and Windows 2008 SP2 x86 AMIs provided | |
# by Amazon | |
# | |
# To run the script, open up a PowerShell prompt as admin | |
# PS> Set-ExecutionPolicy Unrestricted | |
# PS> icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://raw.github.com/gist/1672426/Bootstrap-EC2-Windows-CloudInit.ps1')) |