Skip to content

Instantly share code, notes, and snippets.

View deletosh's full-sized avatar

Dele Tosh deletosh

View GitHub Profile
# From a fresh install of squeeze
apt-get install ruby rubygems # Need ruby to use fpm
gem1.8 install fpm --no-ri --no-rdoc
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -zxvf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125
rm -rf /tmp/ruby193
@deletosh
deletosh / gist:dacf27125961e3efd387
Created June 16, 2014 18:42
Sentry new license
Cartalyst PSL
Copyright (c) 2011-2014, Cartalyst LLC,
All rights reserved.
This license is a legal agreement between you and Cartalyst LLC for the use of
any package (*all versions*) Software (the "Software"). By downloading any
version of the Software you agree to be bound by the terms and conditions of
this license.
You may alter, modify, or extend the Software for your own use or for use in as
@deletosh
deletosh / cap.rb
Last active August 29, 2015 14:14 — forked from kix/cap.rb
http://www.dizzy.co.uk/cheatsheets
This work is licensed under the Creative Commons
Attribution-NonCommercial-NoDerivs 2.0 License. To
view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-nd/2.0/uk
########## Shell Commands ##########
Installation:
$ gem install capistrano
@deletosh
deletosh / sampler
Created July 8, 2015 14:29
something.asp
<!--#include virtual="/ajaxed/bootstrap.asp" -->
<!--#include virtual="/includes/authCheck.asp" -->
<!-- classes -->
<!--#include virtual="/ajaxed/class_email/email.asp" -->
<!--#include virtual="/class/split.inc" -->
<!--#include virtual="/class/csvparser.inc" -->
<%
@deletosh
deletosh / cygwin_setup
Created July 16, 2015 13:38
Properly Setup Cygwin
# Properly Setup Cygwin
#### Moving your home directory to your Windows profile directory
I found this setup to be consistent with other unix systems. It preserves my sanity in the long run.
```
mkpasswd -l -d -p "$(cygpath -H)" > /etc/passwd
mkgroup -l -d > /etc/group
```
#### Installing Essential Programs
Download the setup.exe and install it along with wget. We will be using apt-cyg, which is similar to apt-get in Debian-based linux distros. It allows you to specify the packages you want to install right on the terminal:
@deletosh
deletosh / Prefrences.sublime-settings.json
Last active March 12, 2016 21:33
Dele's Sublime Text 3 Configurations
{
"added_words":
[
"Evernote",
"Evenote"
],
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"enable_live_count": true,
#!/bin/bash
set -e
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${THIS_SCRIPT_DIR}/.."
# Check if there's something uncommitted (don't release if there are files
# not yet committed)
set +e
<!-- #include virtual="/ajaxed/bootstrap.asp" -->
<!-- #include virtual="/class/bulk_mail.inc" -->
<!-- depedance class -->
<!--#include virtual="/class/split.inc" -->
<style>
a.button {
-webkit-appearance: button;
-moz-appearance: button;
@deletosh
deletosh / README.md
Last active March 8, 2018 17:25 — forked from Alymosul/README.md
Downgrade PHP 7.1 to 7.0 on Laravel Forge

Install php7.0 related stuff..

apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages \
php7.0-cli php7.0-dev \
php7.0-pgsql php7.0-sqlite3 php7.0-gd \
php7.0-curl php7.0-memcached \
php7.0-imap php7.0-mysql php7.0-mbstring \
php7.0-xml php7.0-zip php7.0-bcmath php7.0-soap \
php7.0-intl php7.0-readline php-xdebug php-pear php7.0-fpm
@deletosh
deletosh / email_parse_url.py
Created March 2, 2019 23:23 — forked from aptgetupgrade/email_parse_url.py
code to poll emails from an IMAP email server and post these to wallabag
# Read email in inbox, look for any URLs and update them to wallabag, delete email if URLs found in it.
# Built from various internet sources. Final code donated under GPL v3 by Github user aptgetupgrade
# Tested using python 2. Could be run as part of a crontab, e.g. every 5 mins.
#
import sys
import imaplib
import getpass
import email
import email.header
import datetime