Skip to content

Instantly share code, notes, and snippets.

View erm3nda's full-sized avatar
😑
Expressionless master

m3nda erm3nda

😑
Expressionless master
  • n0n3
  • localhost
View GitHub Profile
@amake
amake / innosetup-linux-macos.org
Last active April 17, 2024 13:34
Inno Setup on Linux and macOS

Inno Setup on Linux and macOS

Inno Setup is a popular installer builder for Windows. Of course it is made to run on Windows only, by default. But what if you want to build Windows installers off Windows, i.e. on Linux or macOS?

You’re in luck: It’s possible to run Inno Setup anywhere that Docker runs (including Linux and macOS), and even have a passable experience writing your setup script.

@robulouski
robulouski / gmail_imap_dump_eml.py
Last active April 10, 2024 12:58
Very simple Python script to dump all emails in an IMAP folder to files.
#!/usr/bin/env python
#
# Very simple Python script to dump all emails in an IMAP folder to files.
# This code is released into the public domain.
#
# RKI Nov 2013
#
import sys
import imaplib
import getpass
@caspian311
caspian311 / client.py
Created January 30, 2013 19:36
Simple client-service dbus example in python.
#!/usr/bin/env python
import dbus
class Client():
def __init__(self):
bus = dbus.SessionBus()
service = bus.get_object('com.example.service', "/com/example/service")
self._message = service.get_dbus_method('get_message', 'com.example.service.Message')
self._quit = service.get_dbus_method('quit', 'com.example.service.Quit')
@clungzta
clungzta / raspberry_pi_car.py
Last active March 27, 2024 23:04
Very Simple Car Driver using a Raspberry Pi 3. Cytron MDD10 Hat controls the motor (Motor 1 port). PWM servo (on GPIO18) controls the steering.
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False) # enable warning from GPIO
GPIO.setmode(GPIO.BCM) # GPIO numbering
class RasPiRCCar():
def __init__(self, motor_dir_pin, motor_pwm_pin, steering_pwm_pin, debug=False):
self.debug = debug
if self.debug:
@gowtham1337
gowtham1337 / temp_mail_server.md
Last active March 1, 2024 12:53
A quick guide for creating your own temporary mail server

##Overview You might have a need for a temporary mail service like mailinator.com on your own machine. This guide provides the minimum required steps to do that. The setup we will use is as follows

Procmail (Receive mail and forward to script)--->PHP Script(Parse Mail and put in Database)--->MySQL(Store the mails)--->JSON

Note: This is intended as a quick DIY for simple projects. Hence, we will not go into more details like spam detection and memory optimization.

##Instructions ####Setup Infrastructure

  1. Get a Top level domain name (Note: Getting this to work with a sub-domain will require more work and setup)
@irazasyed
irazasyed / spintax.php
Last active February 21, 2024 17:29
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
*/
class Spintax
{
/**
* Set seed to make the spinner predictable.
*/
@christopherperry
christopherperry / adb+
Created July 30, 2012 16:12
A bash script that let's you issue adb commands to multiple devices at once
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis
@dtmilano
dtmilano / android-select-device
Last active November 29, 2023 09:29
Script to select one connected device or emulator when running adb
#! /bin/bash
#=====================================================================
# Selects an android device
# Copyright (C) 2012-2022 Diego Torres Milano. All rights reserved.
#
# The simplest way to invoke this script is creating a function like
# this one in your shell startup file:
#
# ```
# adb ()
echo "auto_prepend_file=/opt/www/proxy.php" >> /etc/php5/cli/php.ini
@clungzta
clungzta / build_debug_android_kivy.sh
Created May 15, 2017 23:29
Simple bash script to build and run debug android app using Kivy and ADB, includes filtered log output option
VERBOSITY = 1
# Change Package name to suit that
PACKAGE_NAME=org.test.kivytestapp
echo $PACKAGE_NAME
echo "Building the android app in debug mode."
buildozer -v android debug
echo "Loading the app onto to the debug mode device."