Simple fibonacci number calculator.
Usage: fib nth Fibonacci number
/* | |
Prints speaker notes for a reveal.js presentation. | |
To print the notes, run the js function PrintRevealNotes() | |
You need to disable the pop-up blocker | |
Copyright 2016 Patrick G | |
http://geek1011.github.io | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
Accessing a subnet that is behind a WireGuard client using a site-to-site setup
We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.
# implementation of Telegram site authorization checking algorithm | |
# for more information https://core.telegram.org/widgets/login#checking-authorization | |
import collections | |
import hmac | |
import hashlib | |
def check_string(d, token): | |
secret = hashlib.sha256() | |
secret.update(token.encode('utf-8')) |
When Riot Games introduces the Vanguard anti-cheat to League of Legends, you should STOP playing and you should not install the anti-cheat when you get the pop-up. Vanguard is a kernel-level anticheat and these anticheats operate at a privilege level HIGHER THAN YOUR OWN. The anti-cheat can do things that even you can't do, without asking or letting you know. It's like Riot installing a camera in every room of your house and getting a copy of every key inside.
Here is just one example of what they can do: https://www.theregister.com/2013/11/20/esea_gaming_bitcoin_fine/
#!/bin/bash | |
## upgrade-qidi-x-plusmax3.sh | |
## | |
## Usage: | |
## | |
## ssh -u mks {printer_ip} | |
## curl https://gist.githubusercontent.com/nessex/7b574fbe6d965439b773d922ca1b9e05/raw -sSF | bash | |
## | |
## OR: | |
## |
$mod
refers to the modifier key (window/command or alt by default depending on config)
startx i3
start i3 from command line$mod+<Enter>
open a terminal$mod+d
open dmenu (text based program launcher)$mod+r
resize mode ( or to leave resize mode)$mod+shift+e
exit i3// Lock the orientation to Portrait mode | |
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { | |
return UIInterfaceOrientationMask(rawValue: UIInterfaceOrientationMask.portrait.rawValue) | |
} | |
// Lock the orientation to Landscape(Horizontal) mode | |
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { | |
return UIInterfaceOrientationMask(rawValue: UIInterfaceOrientationMask.landscape.rawValue) | |
} | |
# official docs: https://graphql-ruby.org/dataloader/sources.html | |
# app/graphql/sources/association.rb | |
class Sources::Association < ::GraphQL::Dataloader::Source | |
def initialize(association_name, scope = nil) | |
@association_name = association_name | |
@scope = scope | |
end | |
def fetch(records) |