Skip to content

Instantly share code, notes, and snippets.

View CraftingGamerTom's full-sized avatar
👷‍♂️
Let's Build Something!

Thomas Rokicki CraftingGamerTom

👷‍♂️
Let's Build Something!
View GitHub Profile
@CraftingGamerTom
CraftingGamerTom / daemon.md
Created December 23, 2018 08:47 — forked from andreif/daemon.md
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python

Source: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

Access: http://web.archive.org/web/20131025230048/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.

@CraftingGamerTom
CraftingGamerTom / collectData.py
Created December 23, 2018 13:16
Data Collection Script for Aqua IoT - Mongo 1
# Download the helper library from https://www.twilio.com/docs/python/install
import datetime
import time
import dateutil.parser
import pymongo
import os
import glob
import time
from collections import OrderedDict
from twilio.rest import Client
@CraftingGamerTom
CraftingGamerTom / Learn Git Branching.md
Last active October 3, 2024 08:05
learn-git-branching-solution learn-git-branching-main learn-git-branching-remote learn git branching solution learn git branching main learn git branching remote

Learning Git Branching

Please do not continue if you have not learned the content covered in these assignments. It is important to learn the material. However if, like me, you find yourself needing to complete arbitrary tasks for classes you are capable of testing out of - but its not offered. Please continue...

README: To use this quickly, copy and paste the entire block of code in the 'console' using CTRL-V. They have been written so you do not need to copy each line, one-by-one

Main

1.1 Introduction to Git Commits

@CraftingGamerTom
CraftingGamerTom / A Youtube Live Stream Service For Raspberry Pi USB.md
Created March 18, 2019 03:39
This script will take in a parameter of the YouTube stream key then start a new stream every 6 hours (at each quarter of a day - midnight, 6am, noon, 6pm)

A simple bash program that can be run as a service

@CraftingGamerTom
CraftingGamerTom / CreateZippedYamlFile.java
Created August 6, 2019 20:09
Create a YAML file and zip it - Created for passing information to Device Farm
import com.esotericsoftware.yamlbeans.YamlWriter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
/**
* WARNING: This creates a file that is never forced to be deleted. You MUST
* delete the file within the ExtraData object to clear space on the computer.
*
* @param run
* @return ExtraData object (From Amazon Device Farm
@CraftingGamerTom
CraftingGamerTom / HEX Color Codes Alpha Values.md
Last active September 30, 2024 14:59 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

=================

Twitter

How to set transparency with hex value ?

Android

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.