Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ridercz's full-sized avatar
🇨🇿

Michal Altair Valášek ridercz

🇨🇿
View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: <SCRIPT_NAME>
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script to run asp.net 5 application in background
### END INIT INFO
@ridercz
ridercz / KurzyCnb.cs
Last active February 15, 2021 13:09
Class to process exchange rates of Czech National Bank (CNB), including historic data and sample console application.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Net;
using System.Threading.Tasks;
namespace Altairis.KurzyCnb {
class Program {
static void Main(string[] args) {
@ridercz
ridercz / AcmePOC.cs
Last active January 15, 2017 17:14
Certes ACME client POC
using System;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Certes;
using Certes.Acme;
using Certes.Pkcs;
namespace AcmePOC {
using System;
using System.Collections.Generic;
using System.Linq;
public class Program {
public static void Main() {
// Test data
byte[] prefix = { 0xDE, 0xAD, 0xBE, 0xEF }; // 4 bytes
byte[] block1 = { 0xAA, 0xAA, 0xAA, 0xAA }; // 4 bytes
byte[] block2 = { 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, }; // 8 bytes
@ridercz
ridercz / Downloads.cs
Created January 26, 2018 10:08
Sync/Parallel/Async file download
using System;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace Downloads {
class Program {
static void Main(string[] args) {
var urls = new string[] {
@ridercz
ridercz / keybase.md
Created July 12, 2018 11:47
Keybase proof

Keybase proof

I hereby claim:

  • I am ridercz on github.
  • I am ridercz (https://keybase.io/ridercz) on keybase.
  • I have a public key ASAHzRzIu8FjooJ67Avq-ksBi3C0TD8SBxZBOc5A4iB1rwo

To claim this, I am signing this object:

@ridercz
ridercz / House-animated.scad
Last active November 14, 2023 01:22
OpenSCAD House
/*****************************************************************************
** OpenSCAD Example Code by Michal Altair Valasek - https://www.rider.cz **
** Licensed under terms of Creative Commons Attribution License (cc-by) **
** https://creativecommons.org/licenses/by/4.0/ **
*****************************************************************************/
base_width = 40; // X
base_depth = 30; // Y
base_height = 20; // Z
wall = 1;
@ridercz
ridercz / rotate_splice.scad
Created March 6, 2019 17:56
Limiting angles of rotate_extrude in OpenSCAD 2015.3
intersection() {
rotate_extrude() {
translate([20, 0]) circle(5, $fn = 16);
}
translate([0, 0, -5]) linear_extrude(10) rotate_splice(5, 20, 50);
}
module rotate_splice(count, angle_length, radius) {
for(i = [0:count - 1]) {
angle_begin = 360 / count * i;
@ridercz
ridercz / Program.cs
Created April 11, 2019 00:56
Card printer
using System;
using System.Drawing;
using System.Drawing.Printing;
using System.IO;
using System.Linq;
using System.Threading;
namespace CardPrinter {
class Program {
private const string FOLDER_PATH = @"D:\Downloads\badges\Avers";
@ridercz
ridercz / water_mill.scad
Last active September 25, 2019 20:33
Water mill toy 3D model OpenSCAD source
/******************************************************************************
* WATER MILL TOY version 1.0 (2019-09-24)
* Copyright (c) Michal Altair Valasek, 2019, licensed under CC BY-NC-SA
* www.rider.cz | www.altair.blog
*****************************************************************************/
/* OSBS:build */ // enable https://github.com/ridercz/OSBS
/* [Common] */
side_width = 100;