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 | |
# | |
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN | |
# on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise). | |
# With minor modifications, this script *can also be used* on dedicated servers | |
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers. | |
# | |
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN | |
# YOUR AMAZON EC2 INSTANCE STARTS! | |
# |
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 -x | |
set -e | |
cd /tmp | |
wget https://www.cloudflare.com/static/misc/mod_cloudflare/mod_cloudflare.c | |
apxs2 -a -i -c mod_cloudflare.c | |
service apache2 restart |
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 | |
regexp='[0-9]*' | |
# Disable all APs | |
for i in /sys/devices/system/cpu/cpu* | |
do | |
cpu=${i##*/} | |
cpu_num="${cpu#cpu}" | |
if expr match "$cpu_num" "\($regexp\)" > /dev/null |
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
diff --git a/drivers/input/input.c b/drivers/input/input.c | |
index 78d2499..de03463 100644 | |
--- a/drivers/input/input.c | |
+++ b/drivers/input/input.c | |
@@ -431,6 +431,35 @@ void input_event(struct input_dev *dev, | |
{ | |
unsigned long flags; | |
+ if (type == EV_KEY) { | |
+ switch (code) { |
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
remove Lock = Caps_Lock | |
remove Shift = Shift_L | |
keysym Caps_Lock = Shift_L | |
keysym Shift_L = Caps_Lock | |
add Lock = Caps_Lock | |
add Shift = Shift_L | |
remove Control = Control_L |
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
keymaps 0-2,4-6,8-9,12 | |
keycode 42 = Caps_Lock | |
keycode 58 = Shift | |
keycode 29 = | |
keycode 125 = Alt | |
keycode 56 = Control | |
keycode 100 = Control |
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
#include <stdio.h> | |
void * | |
test2(void) | |
{ | |
return __builtin_return_address(1); | |
} | |
void * | |
test1(void *( *func )( void )) |
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 -x | |
# Остановить скрипт, если любая команда завершится с ошибкой | |
set -e | |
# -- BEGIN CONFIGURATION -- | |
## Директория, где располагаются файлы Ghost | |
ghost_dir='/var/www/ghost' | |
## Директория, куда загрузить обновлённую версию | |
download_dir="$(mktemp -d)" |
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
<VirtualHost *:80> | |
ServerName blog.llkl.org | |
ServerAdmin admin@llkl.org | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Location /> | |
ProxyPass unix:/run/ghost/sock|http://127.0.0.1/ | |
ProxyPassReverse unix:/run/ghost/sock|http://127.0.0.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
version = "0.1" | |
description = "count and display the number of function calls" | |
archive(byte,plugin) = "countCalls.cma" | |
archive(native,plugin) = "countCalls.cmxs" |
OlderNewer