fdisk -c=dos -u=cylinders /dev/sdb
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
<?php | |
/* | |
original code by cogitom: https://gist.github.com/997980/ | |
This script reads future events (plus several days into the past) from Facebook pages | |
and creates a subscribable iCalendar | |
Improvements upon the original version: | |
- fixed start and endtime reading | |
- timezone adjustment done on facebook's side (more reliable) |
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
#! /bin/sh | |
# TODO: parse & pass-through sudo options from $@ | |
sudo_options="-E" | |
scls=$X_SCLS | |
#available_scls="`scl --list | tr '\n' ' ' | sed 's/ $//'`" | |
for arg in "$@" | |
do | |
case "$arg" in | |
*\'*) |
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
require 'logger' | |
# Monkeypatch a 'trace' loglevel into ruby Logger | |
class Logger | |
module Severity; TRACE=-1;end | |
def trace(progname = nil, &block);add(TRACE, nil, progname, &block);end | |
def trace?; @level <= TRACE; end | |
end | |
l = Logger.new(STDERR) | |
l.level = Logger::TRACE |
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
require 'net/http' | |
require 'logger' | |
req = Net::HTTP::Put.new('/', { 'expect' => '100-continue' }) | |
req.body = 'data' | |
http = Net::HTTP.new('localhost', 3000) | |
http.continue_timeout = 1 | |
http.set_debug_output(Logger.new($stdout)) | |
http.request(req) |
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
<?php | |
// https://github.com/facebook/php-sdk/ | |
require_once 'path/to/facebook.php'; | |
// http://www.kigkonsult.se/iCalcreator/ | |
require_once 'path/to/iCalcreator.class.php'; | |
$config = array( | |
'appId' => 'xxxx',//change to your fb app id | |
'secret' => 'yyyy',//change to your fb app secret | |
'pageId' => 'shimokitazawa.osscafe',//change to target fb page id |
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
--- | |
version: v3 | |
variant: openshift-enterprise | |
variant_version: '3.1' | |
# The deployment key specifies the hosts and roles fo rthe deployment | |
# and configuration values that apply to the deployment as a whole | |
deployment: | |
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg | |
ansible_log_path: /tmp/ansible.log |
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
import javax.crypto.Cipher; | |
import java.security.NoSuchAlgorithmException; | |
public class KeyLengthDetector { | |
public static void main(String[] args) { | |
int allowedKeyLength = 0; | |
try { | |
allowedKeyLength = Cipher.getMaxAllowedKeyLength("AES"); | |
} catch (NoSuchAlgorithmException e) { |
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
#!/bin/bash | |
# git-standup: find out what you did yesterday (or last friday). | |
# | |
# Setup: | |
# 1. Change AUTHOR if your git user doesn't match your unix account. | |
# 2. Save somewhere on your path, make executable. | |
# 3. git config --global alias.standup '!git-standup' | |
# 4. Profit. | |
# | |
# Original idea via @paulgreg (https://twitter.com/paulgreg/status/248686055727972352) |
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
# Example Rakefile that demonstrates how to add task dependencies | |
# to custom rake tasks that don't allow for the normal rake task | |
# behaviour around setting task dependencies. | |
require 'cucumber/rake/task' | |
# here's the task that I want to run before any of my cucumber tasks (see below) | |
namespace :stub do | |
desc "Start stub required by features" | |
task :start do |
OlderNewer