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
# - list packages | |
# nix-env -qaP | |
# | |
# - install packages in this file, or update packages after channel update: | |
# nix-env -iA nixpkgs.myPackages | |
# | |
# - update package list | |
# nix-channel --update | |
{ | |
allowUnfree = true; |
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
# vim: se filetype=zsh | |
# zmodload zsh/zprof | |
autoload -U add-zsh-hook | |
export LANG=en_US.UTF-8 | |
TZ="Europe/Berlin" | |
HISTFILE=$HOME/.zhistory | |
HISTSIZE=3000 | |
SAVEHIST=3000 |
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
FROM selenium/node-base:3.4.0-dysprosium | |
USER root | |
ARG CHROME_VERSION="google-chrome-beta" | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ | |
&& apt-get update -qqy \ | |
&& apt-get -qqy install \ |
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
/// This is free and unencumbered software released into the public domain. | |
/// | |
/// Anyone is free to copy, modify, publish, use, compile, sell, or | |
/// distribute this software, either in source code form or as a compiled | |
/// binary, for any purpose, commercial or non-commercial, and by any | |
/// means. | |
/// | |
/// In jurisdictions that recognize copyright laws, the author or authors | |
/// of this software dedicate any and all copyright interest in the | |
/// software to the public domain. We make this dedication for the benefit |
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 | |
// Issue 1, empty associative arrays (dictionaries) become regular arrays. | |
$dictionary = array('key' => 'value'); | |
var_dump(json_encode($dictionary)); // gives '{"key":"value"}'; | |
unset($dictionary['key']); | |
var_dump(json_encode($dictionary)); // Gives '[]' -> json dictionary turned into array |
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 | |
apt-get install php5-dev make cmake php-pear | |
git clone git://github.com/alanxz/rabbitmq-c.git && cd rabbitmq-c | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. | |
cmake --build . --target install |
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
/* | |
* Replace ugly Chinese bitmap fonts with system default sans-serif. | |
* ATTENTION: this will intentionally change the appearance of web pages! | |
* Most Chinese websites do not mean to use serif fonts, especially for these ugly ones. | |
*/ | |
@font-face { | |
font-family: "宋体"; | |
src: local("sans-serif"); | |
} |
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/sh | |
rm -rf "$HOME/Library/Preferences/WebIde40" | |
rm -rf "$HOME/Library/Caches/WebIde40" | |
rm -rf "$HOME/Library/Application Support/WebIde40" | |
rm -rf "$HOME/Library/Logs/WebIde40" |
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
# Step 1: Set priveleges | |
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all | |
Starting... | |
Setting allow all users to YES. | |
Setting all users privileges to 1073742079. | |
Done. | |
# Step 2: Allow VNC clients |
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
(function(XHR) { | |
"use strict"; | |
var stats = []; | |
var timeoutId = null; | |
var open = XHR.prototype.open; | |
var send = XHR.prototype.send; | |
NewerOlder