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/python | |
""" | |
Plot Firefox's score in the Sunspider benchmark. | |
""" | |
from pylab import * | |
xlabel('Firefox version') | |
xticks(arange(20), | |
('3.0', '3.5', '3.5.6', '3.6', '3.6 w/TM', '3.7a5pre', '4.0 b1', '4.0 b4')) |
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
ACADEMIC DOUBLE-SPEAK (in student papers) | |
* “It has long been known” - I didn’t look up the original reference. | |
* “A definite trend is evident” - the data is practically meaningless. | |
* “While it has not been possible to provide definitive answers to the questions” - an unsuccessful experiment but I still hope to get it published. | |
* “Three of the samples were chosen for detailed study” - the other results didn’t make sense. | |
* “Typical results are shown” - this is the prettiest graph. | |
* “In my experience” - once. | |
* “In case after case” - twice. | |
* “In a series of cases” - thrice |
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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<!-- http://ubuntuforums.org/showthread.php?t=1354116 --> | |
<fontconfig> | |
<!-- See: man 5 fonts-conf --> | |
<!-- Antialias rules --> | |
<match target="font"> | |
<!--Subpixel smoothing: rgb, bgr, vrgb, vbgr, none--> | |
<edit mode="assign" name="rgba"><const>none</const></edit> |
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
def fizzbuzz(n): | |
if n % 15 == 0: | |
print 'fizzbuzz' | |
elif n % 3 == 0: | |
print 'fizz' | |
elif n % 5 == 0: | |
print 'buzz' | |
else: | |
print n | |
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
// /etc/polkit-1/rules.d/10-rules.rules | |
// PolKit rules to allow mounting, rebooting and network management without a password. | |
// User needs to be in storage, power and network groups. | |
polkit.addRule(function(action, subject) { | |
if (action.id.match("org.freedesktop.udisks2.") && subject.isInGroup("storage")) { | |
return polkit.Result.YES; | |
} | |
}); |
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
[Unit] | |
Description=Gearman server | |
[Service] | |
User=gearman | |
ExecStart=/usr/sbin/gearmand --listen 127.0.0.1 --log-file /var/log/gearmand.log | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
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 | |
# Generate key and certificate for Apache. | |
openssl genrsa -des3 -out server.key 2048 | |
openssl req -new -key server.key -out server.csr | |
cp server.key server.key.org | |
openssl rsa -in server.key.org -out server.key | |
openssl x509 -req -days 3660 -in server.csr -signkey server.key -out server.crt |
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
module.exports = function(grunt) { | |
var appbanner = '/*! Sendmachine <%= grunt.template.today("yyyy-mm-dd HH:MM:ss Z") %> */\nvar build = "<%= grunt.template.today("yyyy-mm-dd HH:MM:ss Z") %>";\n'; | |
grunt.initConfig({ | |
//~pkg: grunt.file.readJSON('package.json'), | |
concat: { | |
options: { |
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
# /etc/X11/xorg.conf.d/20-intel.conf | |
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
Option "AccelMethod" "uxa" | |
Option "TearFree" "true" | |
EndSection |
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
/* | |
1. Whats the difference between a local and a global variable. Implement a bug that could be | |
caused by accidentally forgetting to var a local variable | |
*/ | |
/** | |
A global variable is found in the global scope, eg. the window object, and can | |
be accessed from any other scope. | |
A local variable is contained within the scope of a function and can only be |
OlderNewer