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/env bash | |
yum install vala vala-compat wget gcc libevent-devel openssl-devel gtk2-devel libuuid-devel sqlite-devel jansson-devel intltool cmake qt-devel fuse-devel | |
echo "Building and installing seafile client" | |
export version=4.2.8 # change this to your preferred version | |
alias wget='wget --content-disposition -nc' | |
wget https://github.com/haiwen/libsearpc/archive/v3.0.2.tar.gz | |
wget https://github.com/haiwen/ccnet/archive/v${version}.tar.gz |
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
#!/bin/bash -ue | |
# Dependencies (list might be incomplete): | |
# src/libevent-2.0.21-stable.tar.gz | |
# src/libsearpc (I used git f022c6509cff2eb604024c003eb60bcda975c0b1) | |
# src/ccnet (with Nicolas' patches, I used 3495a78466add16cfa9eddfb35a312bb9ce55264) | |
# src/seafile (with Nicolas' patches, I used 59eb918655dfa5f1328ec72be00681c6192f523d) | |
# | |
# Toolchain: | |
# vala (vala-0.18.1-1.fc18.x86_64) |
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
To set APM level: | |
camcontrol cmd ada0 -a "EF 05 00 00 00 00 00 00 00 00 xx 00" | |
To disable it: | |
camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00 | |
To set AAM level: | |
camcontrol cmd ada0 -a "EF 42 00 00 00 00 00 00 00 00 xx 00" | |
To disable it: | |
camcontrol cmd ada0 -a "EF C2 00 00 00 00 00 00 00 00 00 00 |
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
public function echo_memory_usage() { | |
$mem_usage = memory_get_usage(true); | |
if ($mem_usage < 1024) | |
echo $mem_usage." bytes"; | |
elseif ($mem_usage < 1048576) | |
echo round($mem_usage/1024,2)." kb"; | |
else | |
echo round($mem_usage/1048576,2)." mb"; | |
echo "".PHP_EOL; | |
} |
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
# $FreeBSD: release/10.0.0/share/skel/dot.cshrc 243893 2012-12-05 13:56:39Z eadler $ | |
# | |
# .cshrc - csh resource script, read at beginning of execution by each shell | |
# | |
# see also csh(1), environ(7). | |
# more examples available at /usr/share/examples/csh/ | |
# | |
alias h history 25 | |
alias j jobs -l | |
alias la ls -aF |
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
Match User gnub | |
ChrootDirectory %h | |
PasswordAuthentication yes | |
ForceCommand internal-sftp | |
PermitTTY no | |
X11Forwarding no | |
AllowTcpForwarding no | |
AllowAgentForwarding no |
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
Port 8090 | |
BindAddress 0.0.0.0 | |
MaxHTTPConnections 100 | |
MaxClients 100 | |
MaxBandwidth 1500 | |
CustomLog - | |
NoDaemon | |
<Feed feed1.ffm> | |
File /tmp/feed1.ffm |
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
<? | |
function encrypt($string, $key) { | |
$encryptionMethod = "AES-256-CBC"; | |
$ivkey = sha1($key); | |
$iv = substr($ivkey, 0, 16); | |
return base64_encode(openssl_encrypt($string, $encryptionMethod, $key, 0, $iv)); | |
} |
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
--[[ | |
$Id$ | |
Copyright © 2007-2012 the VideoLAN team | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. |
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
#include<stdlib.h> | |
#include<stdio.h> | |
#include<string.h> | |
int main(){ | |
char *buffer = NULL; | |
char palavra; | |
printf("Alocando memoria\n"); |