Skip to content

Instantly share code, notes, and snippets.

View riipandi's full-sized avatar
🦀
Deep dive into Rust

Aris Ripandi riipandi

🦀
Deep dive into Rust
View GitHub Profile
@riipandi
riipandi / epm.py
Last active November 10, 2015 04:19
Ertix Code Snippets
#!/usr/bin/python
##
# curl -Lsk http://git.io/vk2NC -o /usr/bin/epm; chmod +x /usr/bin/epm
##
"""
Ertix Package Manager
Last updated: 2015/11/10
"""
from __future__ import print_function
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCT9s+L2WYu/M1m5UdvwOm8odqjnSVjW7ErHs2+/psSpO/oUK2A09rVMLDzN0mDcRH2pvCzWXxTfdTSKsV50V8nnh2uJfhjGgL9rxWNOCCpguCzRbt/Lav5NSzoPFeFPJ7e1+p0XfQWZYjhEpPSqT69xPRU/02gaOgkdAn9UufrYa071pJClVGK9zJZ7ZrXXSJJ3wFEojBHDJyllf2aYrzZoRbH0DcWcDFe14wBBGQT+SWWOPysOIiA5tyTHIuGrbiTP2a7ZDymjoQoPzvp6LBySuhr68j3J1frReH59y4H6zgC2YXEMd/gTWFzKGsBK3JDQStV6CbpF5xd69bc0sDp riespandi@live.com
#!/bin/sh
#chkconfig: 345 99 10
#description: Seafile auto start-stop script.
# source function library
. /etc/rc.d/init.d/functions
start() {
echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
@riipandi
riipandi / install-ruby.sh
Created December 17, 2012 11:01
Ruby 1.9.2 Installer Ubuntu 10.04
#!/bin/bash
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
tar xvzf ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290
./configure --prefix=/usr\
--program-suffix=1.9.2\
--with-ruby-version=1.9.2\
--disable-install-doc
make
@riipandi
riipandi / Sublimetext-Shortcut
Last active December 10, 2015 02:38
Sublime Text 2 Shortcut
h1. Sublime Text 2 - Useful Shortcuts (PC)
Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/.
h2. Editing
| *Ctrl+C* | copy current line (if no selection) |
| *Ctrl+X* | cut current line (if no selection) |
| *Ctrl+⇧+K*| delete line |
| *Ctrl+↩* | insert line after |
@riipandi
riipandi / ezstream.sh
Last active December 12, 2015 06:28
EzStream Init Script
#! /bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/ezstream
NAME=ezstream
DESC=ezstream
test -x $DAEMON || exit 0
# Defaults
@riipandi
riipandi / gammu-mysql.sql
Last active December 14, 2015 10:28
Gammu MySQL Database Scheme
-- phpMyAdmin SQL Dump
-- version 2.8.0.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 10, 2006 at 11:08 PM
-- Server version: 5.0.18
-- PHP Version: 5.1.3
--
-- Database: `smsd`
@riipandi
riipandi / damm_algorithm.php
Created July 2, 2013 04:22
Sample implementation Damm algorithm in PHP. Generating and Validating. http://en.wikipedia.org/wiki/Damm_algorithm
<?php
/**
* The Damm check digit
* Damm validation & generation code in PHP.
* Damm algorithm is a check digit algorithm that detects all single-digit errors
* and all adjacent transposition errors. Totally anti-symmetric quasigroup.
*
* For more information cf. http://en.wikipedia.org/wiki/Damm_algorithm
*
@riipandi
riipandi / DropboxSync.py
Last active December 19, 2015 14:09 — forked from wrenoud/DropboxSync.py
Dropbox with Python
import os
import sys
import pickle
import console
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'
@riipandi
riipandi / quota_notify.sh
Created December 20, 2013 03:30
Quota Notify
#!/usr/bin/perl -w
# Author <jps@tntmax.com>
#
# This script assumes that virtual_mailbox_base in defined
# in postfix's main.cf file. This directory is assumed to contain
# directories which themselves contain your virtual user's maildirs.
# For example:
#
# -----------/