Skip to content

Instantly share code, notes, and snippets.

View belovachap's full-sized avatar

Chapman Shoop belovachap

View GitHub Profile
@belovachap
belovachap / disc_raffle.py
Created March 14, 2024 01:07
Disc Raffle March 13, 2024 Final!
import datetime
import pytz
import random
central_tz = pytz.timezone('America/Chicago')
raffle_datetime = datetime.datetime(2024, 3, 13, 18, 0, 0, 0, central_tz)
timestamp = int(raffle_datetime.timestamp())
@belovachap
belovachap / disc_raffle.py
Created March 13, 2024 11:52
Disc Raffle March 13, 2024
import datetime
import pytz
import random
central_tz = pytz.timezone('America/Chicago')
raffle_datetime = datetime.datetime(2024, 3, 13, 18, 0, 0, 0, central_tz)
timestamp = int(raffle_datetime.timestamp())
@belovachap
belovachap / disc_raffle.py
Created March 12, 2024 00:09
Still taking entrants! :)
import datetime
import pytz
import random
central_tz = pytz.timezone('America/Chicago')
raffle_datetime = datetime.datetime(2024, 2, 13, 18, 0, 0, 0, central_tz)
random.seed(raffle_datetime.timestamp())
@belovachap
belovachap / peercoin_lottery.py
Last active December 29, 2020 16:53
The Daily Peercoin Lottery
# -*- coding: utf-8 -*-
import random
PEOPLE = [
'abha',
'backpacker',
'Bora',
'BoxWallet',
'CalmDownDavid',
@belovachap
belovachap / manage_xpm_opencl.py
Created October 20, 2020 21:51
Python script to restart a crashing xpm mining client on Windows 10
import signal
import pexpect
import pexpect.popen_spawn
def open_xpm_client():
print('Opening xpm_client...')
xpm_client = pexpect.popen_spawn.PopenSpawn('xpmclient.exe')
print('xpm_client open!')
@belovachap
belovachap / main.rs
Created October 17, 2018 15:28
check-wallets with threading :)
extern crate reqwest;
extern crate select;
extern crate serde_json;
use select::document::Document;
use select::predicate::{Name, Class, Predicate};
use serde_json::Value;
use std::fs::File;
use std::thread;
@belovachap
belovachap / main.rs
Created September 27, 2018 04:09
Rust program to check the status of Peercoin Airdrop wallets
extern crate reqwest;
extern crate select;
extern crate serde_json;
use select::document::Document;
use select::predicate::{Name, Class, Predicate};
use serde_json::Value;
use std::fs::File;
fn address_used(address: &str) -> bool {
@belovachap
belovachap / Dockerfile
Created February 20, 2017 02:17
Solarcoin Dockerfile for debian jessie full node server
FROM debian:jessie
RUN apt-get update
RUN apt-get install -y make
RUN apt-get install -y build-essential
RUN apt-get install -y libboost-all-dev
RUN apt-get install -y libssl-dev
RUN apt-get install -y libdb++-dev
@belovachap
belovachap / Dockerfile
Created February 13, 2017 03:02
Myriadcoin Dockerfile for building linux binaries
FROM ubuntu:trusty
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-add-repository -y ppa:bitcoin/bitcoin
RUN apt-get update
RUN apt-get install -y autoconf \
automake \
bsdmainutils \
build-essential \
@belovachap
belovachap / scale_video.vala
Created February 27, 2012 05:02
Resize video width/height with GStreamer and Vala
// Scales the video stream from an ogg video file
using Gst;
public class VideoScaler {
private MainLoop loop = new MainLoop ();
private Pipeline pipeline;
private bool bus_callback (Bus bus, Message message) {