Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ittussarom Ynohtna TheTechRobo

🏠
Working from home
View GitHub Profile
@TheTechRobo
TheTechRobo / log.txt
Last active Jun 1, 2020
Create A Log in Python
View log.txt
Here is a website that shows you how to make a log :
https://docs.python.org/3/howto/logging.html
@TheTechRobo
TheTechRobo / accessSyllable.txt
Created Aug 27, 2019
If Syllable's servers are down.... (which they always are)
View accessSyllable.txt
Syllable's servers have been down for at least a year — look at the Wayback Machine
If they are still down (syllable.org) then go to this website:
http://web.archive.org/web/*/http://web.syllable.org/pages/index.html
and choose a snapshot that is blue. The newest one that worked for me is
http://web.archive.org/web/20170910000623/http://web.syllable.org/pages/index.html
(2017 September)
@TheTechRobo
TheTechRobo / backToNormal.bat
Last active Aug 22, 2019
I suck at batch files, but these are two commands that can prank your non-techie friends :) (see the other file)
View backToNormal.bat
@echo off
title
prompt
@TheTechRobo
TheTechRobo / coin_flip_sim.py
Last active Jul 27, 2019 — forked from An-Nguyen1/Coin flip simulator.py
Simulate as many coin flips as your computer can handle
View coin_flip_sim.py
import random
flips = int(input('how many times do you want to flip the coin? '))
outcomes = ['head','tail']
wieghts = [.5,.5]
head=0
tail=0
for flip in range(flips):
h_t = random.choice(outcomes)
if h_t == 'head':
head += 1
@TheTechRobo
TheTechRobo / lockMyMac.py
Last active Jul 27, 2019
lock your Mac from the CLI
View lockMyMac.py
import os
print("John Lockeing the computer............")
os.system('/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend')
print("Locked")
View byeByeDock.sh
defaults write com.apple.Dock autohide-delay -float 3 && killall Dock
echo "Now your Dock, when you hide it, will take at least three seconds to reopen, for me it takes 4-5 secs."
echo "Just turn on Dock hiding and it will work"
You can’t perform that action at this time.