Skip to content

Instantly share code, notes, and snippets.

/**
* Heapsort implementation
* 10 March, 2010, TUCN FA Labs
* Stas Suscov <[email protected]>
*/
#include <stdio.h>
#include <stdlib.h>
double attrs; // stored attributions
double comps; // stored comparisons
@stas
stas / vsftpd.conf
Created February 26, 2010 14:46
VSFTPD.CONF for virtual users with write/read/delete permissions
###
# VSFTPD.CONF for virtual users with write/read/delete permissions
###
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity mpg is
Port ( clk : in STD_LOGIC;
btn : in STD_LOGIC;
led : out STD_LOGIC_VECTOR (3 downto 0);
catod : out STD_LOGIC_VECTOR (7 downto 0);
#! /bin/bash
### BEGIN INIT INFO
# Provides: php-fastcgi
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop php-cgi in external FASTCGI mode
# Description: Start and stop php-cgi in external FASTCGI mode
### END INIT INFO
%%% %%
%%%.%%.
<)_/\ /|
___(_,_),_)|___
|| // \ / || Make love not warcraft!
---------------------------------------
<?php
#include("../config.php");
function epayment_updates($url, $post)#, $save_to, $cookie)
{
$th = curl_init($url);
#$fp=fopen($save_to, "w");
curl_setopt($th, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($th, CURLOPT_BINARYTRANSFER, true);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OpenVZ partitioning, 2 x HDD 70G
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------------------------------------------------------------------
(RAID LEVEL) | LVM LEVEL VOLUME GROUPS | FS LEVEL
------------------------------------------------------------------------------------------------------------------------------------
1HDD 2HDD Volume groups logical volumes Mount points and filesystems
==== ==== ============= =============== ============================
1G 1G RAID1 skip skip /boot ext(2,3)/reiserfs
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index f3280cc..856290f 100755
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -59,6 +59,12 @@ class ProjectsController < ApplicationController
:limit => Setting.feeds_limit.to_i)
render_feed(projects, :title => "#{Setting.app_title}: #{l(:label_project_latest)}")
}
+ format.xml {
+ render :xml => Project.visible.all
@stas
stas / Makefile
Created September 27, 2009 14:32
Makefile for create_aliases.sh
clear: aliases.db
rm -f /tmp/aliases.tmp
aliases.db: aliases
postalias /etc/aliases
postfix reload
aliases.tmp: /etc/aliases.original
cat /etc/aliases.original > /tmp/aliases.tmp
/var/www/redmine/extra/mail_handler/create_aliases.sh >> /tmp/aliases.tmp
@stas
stas / create_aliases.sh
Created September 27, 2009 14:31
create_aliases.sh
#/bin/bash
FILE='/tmp/redmin_projects'
MAILHANDLR='/var/www/redmine/extra/mail_handler/rdm-mailhandler.rb'
URL='http://host.tld'
KEY='yourkey'
OPTS='priority,status'
wget -q $URL/projects.yaml -O - | grep 'identifier: ' | cut -d ':' -f2 > $FILE
exec<$FILE
while read p
do