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
/* | |
Based on ahoka's Firefox CSS for linux | |
expanded upon by masood // twnsnd | |
browser.tabs.onTop should be set to false in about.config | |
*/ | |
/* HIDDEN ELEMENTS */ | |
#identity-box, | |
#urlbar-container dropmarker, | |
#tabbrowser-tabs .scrollbutton-up, |
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
javascript:(function() { window.location.href += '?w=1';})(); |
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
When using the linux utility dd, there is no visual output of the progress, how long it is going to take, or anything else. Easy to solve with the use of pv: | |
% sudo fdisk -l | |
% pv /dev/sda | dd of=/dev/sdb bs=100M | |
that’ll display the amount of data transferred, the elapsed time, the throughput speed, a nice progress bar, and the ETA. For devices that do not have a fixed size, let’s say, /dev/zero, there’ll be only a throughput display. | |
- http://www.yournearestbar.com/2011/10/monitoring-dd-with-a-progress-bar/ |
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
// AVX CPU dispatching - based on Agner Fog's C++ vector class library: | |
// http://www.agner.org/optimize/vectorclass.zip | |
#include <stdio.h> | |
#include <stdbool.h> | |
//------------------------------------------------------------------------------ | |
//>> BEGIN <instrset.h> | |
// Detect 64 bit mode |
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
// -*- compile-command: "clang++ -ggdb -o random_selection -std=c++0x -stdlib=libc++ random_selection.cpp" -*- | |
//Reference implementation for doing random number selection from a container. | |
//Kept for posterity and because I made a surprising number of subtle mistakes on my first attempt. | |
#include <random> | |
#include <iterator> | |
template <typename RandomGenerator = std::default_random_engine> | |
struct random_selector | |
{ | |
//On most platforms, you probably want to use std::random_device("/dev/urandom")() |
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
# -*- mode: ruby; encoding: utf-8 -*- | |
require 'albacore' | |
require 'win32/shortcut' | |
task :default => :shortcut | |
BUILD_DIR='viewer-local' | |
ENV['LANG'] = 'C' |
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 bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
# Can retrieve cloudflare Domain id and list zone's, because, lazy | |
# Place at: | |
# /usr/local/bin/cf-ddns.sh |
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
#delete all the remote tags with the pattern your looking for, ie. DEV- | |
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/% | |
#delete all your local tags | |
git tag | xargs -n 1 -i% git tag -d % | |
#fetch the remote tags which still remain | |
git fetch |
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 ruby | |
# Change all of the A records in your cloudflare account to point at a new IP | |
# chmod +x file.rb;./file.rb to run | |
# Example command: ./file.rb <ip> or let it prompt you | |
require 'cloudflare' # Laziness at it's best; Source: https://github.com/B4k3r/cloudflare | |
# Just some coloring crap | |
class String | |
def colorize(color_code); "\e[#{color_code}m#{self}\e[0m" end |
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
/* | |
Check SSE/AVX support. | |
This application can detect the instruction support of | |
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX. | |
*/ | |
#include <iostream> | |
#ifdef _MSC_VER | |
#include <intrin.h> | |
#endif |
OlderNewer