Skip to content

Instantly share code, notes, and snippets.

@admiral0
admiral0 / discord.py
Created February 9, 2016 16:22
Discord bot
import ast
import random
import re
import sys
import discord
from PyQt5 import QtWidgets, Qt, QtCore
def calc_random(dice, dice_type):
@admiral0
admiral0 / Jenkinsfile
Created April 22, 2017 16:00
Jenkinsfile for building LEDE
pipeline {
agent any
stages {
stage("SCM Update"){
steps {
sh "git remote add lede git://git.lede-project.org/source.git || true"
sh "git fetch lede"
sh "git branch -D build"
sh "git checkout -b build"
--
-- Excavator
--
-- Under 1000 the turtle will try to consume all fuel it mines
fuel = 1000
y = tonumber(arg[1]) - 1
x = tonumber(arg[2]) - 1
import json
import boto3
from datetime import datetime
ddb = boto3.client('dynamodb')
def lambda_handler(event, context):
today = datetime.utcnow().strftime('%d%m%Y')
try:
lulz = ddb.get_item(TableName='morti-di-stima', Key={'data': {'S': today}})['Item']['morti']['S']
@admiral0
admiral0 / configuration.nix
Last active May 17, 2025 12:15
Jovian configuration for my HTPC
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix