This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:gogs] | |
command=/home/<GOGS-USER>/gogs/gogs web | |
autostart=true | |
user=<GOGS-USER> | |
directory=/home/<GOGS-USER>/gogs | |
environment=HOME="/home/<GOGS-USER>",USER="<GOGS-USER>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph = { | |
("A", "yes"): "B", | |
("A", "no"): "C", | |
} | |
accepted_states = ("B", "C") | |
transitions = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def log(log_name): | |
def decorator(func): | |
def inner(self, nombre): | |
print("[%s] Logging a call to %s" % (log_name, func.__name__)) | |
return func(self, nombre) | |
return inner | |
return decorator | |
class Persona: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mgdelacroix on github. | |
* I am mcrx (https://keybase.io/mcrx) on keybase. | |
* I have a public key whose fingerprint is 02C3 D31C DAEB 9EAE ED10 EC99 FF33 E166 37E2 E649 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab("io.jsonwebtoken:jjwt:0.4") | |
import io.jsonwebtoken.Jwts | |
import static io.jsonwebtoken.SignatureAlgorithm.HS256 | |
def key = "2193872103019283092174917" | |
def token = Jwts.builder() | |
.setSubject("Hello World") | |
.signWith(HS256, key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const NoSuchElementException = new Error("No such element exception"); | |
class Optional<T> { | |
value: T; | |
constructor(value: T) { | |
this.value = value; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=No-IP Dynamic DNS Update Client | |
After=network.target | |
[Service] | |
Type=forking | |
Restart=always | |
ExecStart=/usr/local/bin/noip2 | |
[Install] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os/exec" | |
"strings" | |
) | |
func check(e error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
gogs = | |
{ config, pkgs, ... }: | |
{ | |
deployment.targetEnv = "virtualbox"; | |
deployment.virtualbox.memorySize = 512; | |
deployment.virtualbox.vcpu = 2; | |
deployment.virtualbox.headless = true; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let waiting = false | |
process.on('SIGINT', () => { | |
console.log('CTRL+C detected!') | |
if (!waiting) { | |
waiting = true | |
} else { | |
console.log('Was waiting, so exiting now') | |
process.exit(0) | |
} | |
setTimeout(() => process.exit(0), 2000) |