groupadd vagrant
usermod -aG vagrant user
This file contains hidden or 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
user www-data; | |
worker_processes 4; # number of cores on machine | |
error_log /var/log/nginx/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { |
This file contains hidden or 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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/v0.10.37/node-v0.10.37-linux-x86.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.com/install.sh | sh |
This file contains hidden or 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
BEFORE: | |
sam@ubuntu discourse % rm -fr tmp/cache | |
sam@ubuntu discourse % rm -fr public/assets | |
sam@ubuntu discourse % time RAILS_ENV=production bin/rake assets:precompile | |
58.55s user 1.79s system 100% cpu 1:00.02 total | |
AFTER: |
This file contains hidden or 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/php -qC | |
<?php | |
/****************************************************************************** | |
* | |
* @file gitolab.php | |
* @author Benoit Zohar | |
* @link http://benoitzohar.fr/ | |
* @last-edited 2015-01-09 | |
* @description Migrate projects from Gitolite to GitLab |
This file contains hidden or 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
In file C:\xampp\htdocs\openeclass\install\install_db.php on line 684 | |
Error: Unable to execute statement with error: "You have an error in your SQL syntax; | |
check the manual that corresponds to your MySQL server version for the right syntax to | |
use near ' `attempt_status` tinyint(4) NOT NULL DEFAULT 1, ' at line 9" (SQLSTATE=1064 ERROR=42000) | |
[Statement='CREATE TABLE IF NOT EXISTS `exercise_user_record` ( `eurid` INT(11) NOT NULL AUTO_INCREMENT | |
PRIMARY KEY, `eid` INT(11) NOT NULL DEFAULT 0, `uid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, | |
`record_start_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `record_end_date` DATETIME DEFAULT NULL, | |
`total_score` INT(11) NOT NULL DEFAULT 0, `total_weighting` INT(11) DEFAULT 0, `attempt` INT(11) NOT NULL DEFAULT 0), | |
`attempt_status` tinyint(4) NOT NULL DEFAULT 1, `secs_remaining` INT(11) NOT NULL DEFAULT '0') | |
DEFAULT CHARACTER SET=utf8' Elapsed=0.00097599999999998] |
This file contains hidden or 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 "rubygems" | |
require "json" | |
require "net/http" | |
require "uri" | |
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty") | |
http = Net::HTTP.new(uri.host, uri.port) | |
request = Net::HTTP::Get.new(uri.request_uri) |
This file contains hidden or 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
#a/usr/bin/perl | |
# This script was hastily cobbled together for my own use. It can | |
# probably break your system. Use at your own risk. | |
$JAIL = "/srv/http"; | |
$USER = "http"; | |
$GROUP = "http"; | |
$WWW_DIR = "www"; | |
sub run{ |
This file contains hidden or 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
#a/usr/bin/perl | |
# This script was hastily cobbled together for my own use. It can | |
# probably break your system. Use at your own risk. | |
$JAIL = "/srv/http"; | |
$USER = "http"; | |
$GROUP = "http"; | |
$WWW_DIR = "www"; | |
sub run{ |
This file contains hidden or 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
--- _django.org 2012-06-16 23:48:07.256319726 +0900 | |
+++ .compfunc/_django 2012-06-16 23:55:32.556331127 +0900 | |
@@ -31,7 +31,6 @@ | |
"cleanup:remove old data from the database" | |
"compilemessages:compile .po files to .mo for use with gettext" | |
"createcachetable:creates table for SQL cache backend" | |
- "createsuperuser:create a superuser" | |
"dbshell:run command-line client for the current database" | |
"diffsettings:display differences between the current settings and Django defaults" | |
"dumpdata:output contents of database as a fixture" |