Peripheral | Rate (bit/s) | Rate (byte/s) |
---|---|---|
USB 2.0 | 480 Mbit/s | 60 MB/s |
USB 3.0 | 5 Gbit/s | 625 MB/s |
Thunderbolt | 10 Gbit/s × 2 | 1.25 GB/s × 2 |
PCI Express 2.0 ×2 | 8 Gbit/s | 1 GB/s |
PCI Express 2.0 ×4 | 16 Gbit/s | 2 GB/s |
PCI Express 2.0 ×8 | 32 Gbit/s | 4 GB/s |
PCI Express 2.0 ×16 | 64 Gbit/s | 8 GB/s |
FireWire 400 | 393.216 Mbit/s | 49.152 MB/s |
This file contains hidden or 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
from django.db import connection | |
from django.utils.log import getLogger | |
logger = getLogger(__name__) | |
class QueryCountDebugMiddleware(object): | |
""" | |
This middleware will log the number of queries run | |
and the total time taken for each request (with a | |
status code of 200). It does not currently support |
This file contains hidden or 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 ruby -w | |
# brew-services(1) - Easily start and stop formulas via launchctl | |
# =============================================================== | |
# | |
# ## SYNOPSIS | |
# | |
# [<sudo>] `brew services` `list`<br> | |
# [<sudo>] `brew services` `restart` <formula><br> | |
# [<sudo>] `brew services` `start` <formula> [<plist>]<br> |
This file contains hidden or 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
<?php | |
include_once "database.php"; | |
class ActiveRecord | |
{ | |
private $table = ''; | |
private $table_contents = array(); | |
private $primary_key = "id"; | |
public $ONE_TO_ONE = 1; |
This file contains hidden or 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
# Create new file trough vim in the following directory | |
sudo vim /usr/share/applications/sublime.desktop | |
#Put the following file contents and replace with the path to your Sublime Text | |
[Desktop Entry] | |
Version=1.0 | |
Name=Sublime Text 2 | |
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings. | |
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. | |
GenericName=Text Editor |
This file contains hidden or 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
# For training rest 5 min on compounds, 3-5 minutes on smaller ones | |
# Training A (first set to failure, second set -10% weight + 1 rep): | |
# Deadlift - 2x4-5 | |
# Overhead Press - 1x6-8 | |
# Weighted Chinup - 2x4-6 | |
# Chest-Supported Rows - 2x6-8 | |
# Close-grip chinup - 1x6-10 | |
# Training B (first set to failure, second set -10% weight + 1 rep): |
This file contains hidden or 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
def fetch_contents(queue = "default", max = 100000) | |
Sidekiq.redis do |r| | |
r.lrange("queue:#{queue}", 0, max) | |
end; | |
end | |
def sidekiq_job_breakdown(queue = "default", contents = nil) | |
re = /\"class":"([0-9A-Za-z_::]+)"/ | |
contents ||= fetch_contents(queue) |
This file contains hidden or 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
* |
Updated: Just use qutebrowser (and disable javascript). The web is done for.
First get the Interface mac address, then use that to run the full command
INTERFACE=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/)
SUBNET_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${INTERFACE}/subnet-id)
VPC_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${INTERFACE}/vpc-id)
echo SUBNET_ID
OlderNewer