Skip to content

Instantly share code, notes, and snippets.

View Alir3z4's full-sized avatar
💭
Rock'nRolla

Alireza Savand Alir3z4

💭
Rock'nRolla
View GitHub Profile
@Alir3z4
Alir3z4 / HelloWorld.java
Created October 29, 2016 14:36
Spark Java Quick Start
import static spark.Spark.*;
public class HelloWorld {
public static void main(String[] args) {
get("/hello", (req, res) -> "Hello World");
}
}
// Fire it up: http://localhost:4567/hello
@Alir3z4
Alir3z4 / decorators.py
Created September 3, 2016 17:14
Defining ``account`` package custom decorators.
# -*- coding: utf-8 -*-
"""
account.decorators
==================
Defining ``account`` package custom decorators.
Including:
* redirect_if_logged_in
@Alir3z4
Alir3z4 / utils.py
Created August 9, 2016 06:19
Create a hash of a file on upload time and save it for Django FileField/ImageField
def hash_file(file, block_size=65536):
hasher = hashlib.md5()
for buf in iter(partial(file.read, block_size), b''):
hasher.update(buf)
return hasher.hexdigest()
def upload_to(instance, filename):
"""
@Alir3z4
Alir3z4 / sign.html
Created February 2, 2016 18:34
sign
<br /> <br/>
<small>
Support: <a href="mailto:support@kloud51.com">support@kloud51.com</a> <br/ >
Sales: <a href="mailto:sales@kloud51.com">sales@kloud51.com</a> <br />
Phone: +16509635702 <br />
<br/>
Community: <a href="http://blog.kloud51.com/">Kloud51 Community</a> <br />
Twitter: <a href="https://twitter.com/SavandBros">@SavandBros</a> <br />
Facebook: <a href="https://www.facebook.com/savand.bros">fb.com/Savand.Bros</a> <br />
Instagram: <a href="https://instagram.com/savandbros/">@savandbros</a> <br />

This OS has been customized and pre-configured to be a super light and fast ArchLinux with desktop. Pre-configured installed applications:

  • OpenBox: A super light and blazing fast and user friendly DE.
  • XRDP: Remote Desktop, ability to contiune last closed session.
  • Firefox: Firefox has been chooses to be default browser.
  • Security: SSH Brute Force.
  • Graphical text editor: Medit, Geany.
  • Terminals: xterm, LXTerminal
  • Yaourt: access to thousands of community built ArchLinux packaegs.

Lately we had many reports from people that their server got blocked from us due to Anti-Hack. Our users were stating that none of them did anything wrong, some of them didn't even use the machines, their server would get blocked before they even gain access to it.

Kloud51 team started testing all the official and un-official OpenVZ OS templates one by one, so far all of them were fine with not a single malicious files or activity. We ran many tests and different tools to find a hole or malicious file, absolutely nothing was there.

We launched hundreds of VPS machines and keep monitoring them, each with different OS templates and kind of software installed on. Of course we got some help from volunteers in this test from our clients, which they allow us to install our monitoring and log collectors on their machines.

Result was obvious, amazing, not only we found the source of the issues but solution to fix them as well.

@Alir3z4
Alir3z4 / light_de.sh
Created December 5, 2015 11:41
Install quicks
apt-get purge apache2* bind9* samba* -y
apt-get install software-properties-common -y
apt-add-repository ppa:midori/ppa -y
add-apt-repository ppa:ubuntu-wine/ppa -y
apt-get update -y
apt-get upgrade -y
apt-get install nano jwm xrdp midori -y
@Alir3z4
Alir3z4 / xapian-virtualenv.sh
Last active September 29, 2021 16:46
install xapian inside virtualenv
#!/usr/bin/env bash
pkgver=1.2.21
mkdir -p $VIRTUAL_ENV/src && cd $VIRTUAL_ENV/src
curl -O http://oligarchy.co.uk/xapian/$pkgver/xapian-core-$pkgver.tar.xz && tar xf xapian-core-$pkgver.tar.xz
curl -O http://oligarchy.co.uk/xapian/$pkgver/xapian-bindings-$pkgver.tar.xz && tar xf xapian-bindings-$pkgver.tar.xz
cd $VIRTUAL_ENV/src/xapian-core-$pkgver
@Alir3z4
Alir3z4 / kloud51-plans.txt
Created June 18, 2015 12:21
Kloud51 Plans Comparison
Storage: 51GB
Traffic: 551GB
Domain Limit: Unlimited
FTP Accounts: Unlimited
Databases: Unlimited
DDoS Protection: Yes
RAID Backup: Yes
Kloud51 Subdomain: Yes
SSH Access: Yes
cPanel: Yes
def function_of_love():
raise OverflowError