View config.zig
This file contains 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
pub const EntityType = enum { variable, array, object }; | |
pub const Variable = struct { name: []const u8, value: []const u8 }; | |
pub const Array = struct { name: []const u8, content: []const Variable }; | |
pub const Object = struct { name: []const u8, fields: []const Variable }; | |
pub const Entity = union(EntityType) { variable: Variable, array: Array, Object: Object }; |
View db-upload-chunk-backup.py
This file contains 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
#!/usr/bin/env python | |
import dropbox | |
import os | |
import time | |
file_path = "/opt/backups/backup.tar.gz" | |
dest_path = "/Apps/backup/" | |
dbx = dropbox.Dropbox("<app-token>") | |
dest_today_path = dest_path + time.strftime("%Y-%m-%d") + ".tgz" |
View chests.yml
This file contains 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
# Just copy paste if you want more chests. The percentages for chests must add up to 100! | |
config: | |
enabled: true | |
modes: | |
chests: true | |
items: false | |
chests: | |
chest1: | |
items: 5*64;5*64;5*64;5*64;262*64;278*1;5*64%30 | |
percentage: 5 |
View caddy.hs
This file contains 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
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} | |
import Data.Text hiding (filter, unwords) | |
import Pipes | |
import Data.IORef | |
import Data.Maybe | |
import Data.Time (UTCTime(..), getCurrentTime) | |
import qualified Data.Map.Strict as M |
View DungeonGenerator.cpp
This file contains 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
// cfr.pw | |
#include "JG.h" | |
#include "DungeonGenerator.h" | |
ADungeonGenerator::ADungeonGenerator() { | |
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. | |
PrimaryActorTick.bCanEverTick = true; | |
RootComponent = CreateDefaultSubobject<USceneComponent>("SceneRoot"); |
View f-ascii.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View f.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Completion.swift
This file contains 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
struct Completion<A> { | |
let f: (A -> Void) | |
init(f: A -> Void) { | |
self.f = f | |
} | |
func run(a: A) { | |
f(a) | |
} | |
} |
View devert
This file contains 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
#!/usr/bin/env sh | |
# http://stackoverflow.com/a/30819570/187663 | |
ffmpeg -i $1 -i $1 -filter_complex "[0:v]scale=-1:720[scaled_video];[1:v]scale=1280:720,boxblur=16[blur_image];[blur_image][scaled_video]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[outv]" -c:v libx264 -aspect 1280/720 -map [outv] -map 0:a -c:a copy $1.fixed.mp4 |
View cpy-vs-cat.c
This file contains 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
// clang -std=c99 -O3 cpy-vs-cat.c | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <mach/mach_time.h> | |
const int e6 = 1000000; | |
#define repeat for(int j = 0; j < e6; j++) | |
void flush() { fflush(stdout); } |
NewerOlder