Skip to content

Instantly share code, notes, and snippets.

Avatar

Cal Leeming foxx

View GitHub Profile
@foxx
foxx / disable.reg
Last active May 12, 2019 18:11
disable feature upgrade windows 10
View disable.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade]
"AllowOSUpgrade"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DisableOSUpgrade"=dword:00000001
sc config wuauserv start= disabled
sc stop wuauserv
View gist:1db13869cd551fba843ce7661c064279
{
"id": 369,
"node_id": "MDEwOlJlcG9zaXRvcnkzNjk=",
"name": "css_naked_day",
"full_name": "collectiveidea/css_naked_day",
"private": false,
"owner": {
"login": "collectiveidea",
"id": 128,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjEyOA==",
View gist:a11296e1978cc3987667229060d108d1
[
{
"id": 1,
"node_id": "MDEwOlJlcG9zaXRvcnkx",
"name": "grit",
"full_name": "mojombo/grit",
"private": false,
"owner": {
"login": "mojombo",
"id": 1,
View gist:86752c65f75a2afb942a477d7bf6fb38
[
{
"login": "mojombo",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://avatars0.githubusercontent.com/u/1?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mojombo",
"html_url": "https://github.com/mojombo",
"followers_url": "https://api.github.com/users/mojombo/followers",
@foxx
foxx / app.txt
Last active July 9, 2018 19:59
River Oakfield Job Application
View app.txt
========================================================================
_____ _ ____ _ __ _ _ _
| __ \(_) / __ \ | | / _(_) | | | |
| |__) |___ _____ _ __ | | | | __ _| | _| |_ _ ___| | __| |
| _ /| \ \ / / _ \ '__| | | | |/ _` | |/ / _| |/ _ \ |/ _` |
| | \ \| |\ V / __/ | | |__| | (_| | <| | | | __/ | (_| |
|_| \_\_| \_/ \___|_| \____/ \__,_|_|\_\_| |_|\___|_|\__,_|
========================================================================
View gist:30e6728a8924304cd6cd62814b446730
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmUbHVjm4tsZMquZPUhGKF9rxyDPuev3hMyxoQ259WFq3e9i4EewiaAlPyFUg8trkgQqudhiUPNPcXimnwNryKAUgHkc85olJTerwDfW/FvW4Evq4WWRZiotDfD77EW7Rhn26eCCDYVYN+5CWGHGTUgh1C5s38VgLFV2MgijFWXP/MknR7LGREXgVw3o0jTtOJHHKgEqK+9bRiBA5ESvdScVtw4MLP5dED5Toj27TJxhMdtESNMhdue0ozS3jGquaWM1mEdkTABoGnMUfnzOmVQet5w++3WQwVNoyy0J+DQ38Hyw6OCt0aCAhlPucD+Mp3su3sqGzOG3FrrAnVX0VL cal@ro
View gist:428f167427f4e556e467bc8ff13c18f9
#!/usr/bin/python3
hrs = input("Enter Hours:")
rate = input("Enter Rate:")
#Computing Overtime
if float(hrs) > 40:
hrs_difference = float(hrs) - 40
#print(hrs_difference)
overtime_pay = float(hrs_difference *(rate * 1.5))
print(overtime_pay)
View gist:e01a65470b6e0b024c70c3ee74efabf6
def comParsing():
global comDist,n,nodeCoordinates
n = int(graph.split('\n')[0].split())
for i in graph.split('\n')[1:]:
nodeCoordinates.append((int(i.split()[0]), int(i.split()[1])))
for i,index in zip(nodeCoordinates,range(n)):
for j,index2 in zip(nodeCoordinates,range(n)):
comDist[index][index2]=math.sqrt((nodeCoordinates[j][0]-nodeCoordinates[i][0])**2+(nodeCoordinates[j][1]-nodeCoordinates[i][1])**2) #rasstoyanie ot i do vseh j
def commivoyager():
View cembed.py
#!/usr/bin/env python
"""
Embed files into C arrays
Hacky solution because xxd didn't have enough features
"""
from __future__ import with_statement
from __future__ import print_function
View extend_instance.py
def extend_instance(instance, *bases, **kwargs):
"""
Apply subclass (mixin) to a class object or its instance
By default, the mixin is placed at the start of bases
to ensure its called first as per MRO. If you wish to
have it injected last, which is useful for monkeypatching,
then you can specify 'last=True'. See here:
http://stackoverflow.com/a/10018792/1267398
:attr cls: Target object