Skip to content

Instantly share code, notes, and snippets.

View Cyan101's full-sized avatar
💭
Looking for work/projects!

Cyan Cyan101

💭
Looking for work/projects!
  • Perth, Australia
View GitHub Profile
@Cyan101
Cyan101 / threadTest.py
Created January 3, 2022 06:13
Testing threading on micropython
import machine
import utime
import _thread
def threadStart(x):
while True:
print(f"Thread {x} here!")
utime.sleep(1)
_thread.start_new_thread(threadStart(1), ())

Keybase proof

I hereby claim:

  • I am cyan101 on github.
  • I am cyan101 (https://keybase.io/cyan101) on keybase.
  • I have a public key ASDPkayfRssOeK4mbXq0jZ9AQSmnZBz_Xgy2UwH864dN5go

To claim this, I am signing this object:

@Cyan101
Cyan101 / Collatz_Tag_System.rb
Last active June 1, 2017 12:20
[2017-05-29] Challenge #317 [Easy] Collatz Tag System
#[2017-05-29] Challenge #317 [Easy] Collatz Tag System
#https://www.reddit.com/r/dailyprogrammer/comments/6e08v6/20170529_challenge_317_easy_collatz_tag_system/
tag_keys = %w(a b c)
tag_system = %w(bc a aaa)
puts "what do i start with? (at least 3 chars, combination of a/b/c)"
tag = gets.chomp
while tag.length > 2
case tag.chr
@Cyan101
Cyan101 / unqiue_id_gen.rb
Created May 27, 2017 13:17
Creates a 8-character unique ID based off the current time
def unique_id
DateTime.now.strftime('%Q').to_i.to_s52
end
class Numeric
Alpha52 = ('a'..'z').to_a + ('A'..'Z').to_a
def to_s52
return '' if self < 1
s = ''
q = self
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape) {
/*ipad landscape */
}
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) {
/*ipad portrait */
}
@Cyan101
Cyan101 / install-libsodium.sh
Created February 16, 2017 11:37 — forked from jonathanpmartins/install-libsodium.sh
Install Libsodium on Ubuntu 14.04.3 LTS Trusty
#!/bin/bash
sudo add-apt-repository ppa:chris-lea/libsodium;
sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo apt-get update && sudo apt-get install libsodium-dev;
@Cyan101
Cyan101 / gen_keys.sh
Created November 19, 2016 06:54 — forked from hvasconcelos/gen_keys.sh
Create an Sinatra SSL Server
# Generate a self-signed Certificate and a Private Key
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout pkey.pem -out cert.crt
require 'htmlentities'
coder = HTMLEntities.new
puts "Pack name please"
packname = gets.chomp
template = ["---\n", "expansion: #{packname}\n", "authors:\n", "- CAH\n", "- Cyan101\n", "questions:\n"]
loop do
puts "Saved file name"