Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Playit.gg uninstall script for Linux (x86 and arm)
# This script removes playit.gg and undoes all changes made by the setup script,
# including the systemd service, screen session, apt package/PPA, and binary files.
service_file="/etc/systemd/system/playit.service"
binary_path=""
# Parse the binary path from the service file before we remove it
{
"openapi": "3.0.0",
"info": {
"title": "playit.gg's api",
"version": "unstable"
},
"servers": [
{
"url": "https://api.playit.gg"
}
apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
set -sg escape-time 0
# Use C-a as prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
ffmpeg -ss 61.0 -t 2.5 -i $1 -filter_complex "[0:v] split [a][b];[a] palettegen [p];[b][p] paletteuse" $2
auto end = std::chrono::high_resolution_clock::now();
std::cout << (((float) std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count()) / 1000000.0f) << " milliseconds" << std::endl;
@loriopatrick
loriopatrick / Promise.java
Created June 17, 2017 08:22
Promises in Java modeled after NodeJS
package com.patricklorio.promise;
import java.util.ArrayList;
import java.util.function.Consumer;
/**
* @author plorio
*/
public class Promise<T> {
public Promise(Async<T> async) {
@loriopatrick
loriopatrick / .tmux.conf
Last active November 7, 2017 21:09
Dot files
set -sg escape-time 0
# Use C-a as prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
Transaction submitted. TX ID
0xb4529008a87b728d059748e66e57d45d0b84468856f9cdf3d8152c30203d7df9
View your transaction & Contract Address 0x9d95f787df552e038150de5f02c3066ce2bd4e53
pragma solidity 0.4.10;
contract SimpleEtherCardGame {
address[] players;
uint256 buy_in;
uint256 close_block;
uint8 closers;
bool started;
struct Player {