Skip to content

Instantly share code, notes, and snippets.

View UlisseMini's full-sized avatar
:shipit:
doing stupid stuff in the most complicated way possible

Ulisse Mini UlisseMini

:shipit:
doing stupid stuff in the most complicated way possible
View GitHub Profile
@UlisseMini
UlisseMini / badvideos.js
Created March 21, 2020 21:19
clicks "not interested" on channels with detected clickbait/banned words on youtube
function is_capital(c) { return (c >= 'A') && (c <= 'Z') }
function bad_video(video) {
let title = video.querySelector('#video-title').textContent
let channel = video.querySelector('#avatar-link').title
// console.log('chan:',channel,'title:',title)
// Simple channel whitelist
let good_channels = ['melodysheep', 'Zeruel82Mk2']
all: build run
build:
# Pretend I have no control over how add.c is compiled
gcc -Wall add.c -o add
# I have control over how I compile ./call
gcc -Wall -ldl call.c -o call
run:
./call
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
---------
-- Module for managing coordanites in opencomputers.
-- @module coords
-- @author Ulisse Mini
-- @license MIT
local r = require('robot')
--- The entire API lives in here.
local t = {}
;; This program assumes the turtle is placed one into the leftmost block
;; in the middle, it also assumes the turtle is facing forward.
;; It will dig a three tall pathway forward until it runs out of fuel or count is reached.
(local args [...])
(when (~= (# args) 1)
(error 'Usage: mine <count> [width]')) ; TODO: Implement optional [width].
(local width 7)
(local fuelLimit (turtle.getFuelLimit))
#!/bin/bash
set -e
# https://unix.stackexchange.com/questions/70615/bash-script-echo-output-in-box
function print() {
local s="$*"
tput setaf 3
echo " -${s//?/-}-
| ${s//?/ } |
| $(tput setaf 4)$s$(tput setaf 3) |
defmodule Cli do
@moduledoc " Cli to check if a gitlab username is taken"
@doc " The entry point for the program"
def main([]) do
IO.puts "Usage: #{:escript.script_name()} <username>"
end
def main([user]) do
Application.ensure_all_started(:inets)
use std::io::{ErrorKind, Read, Write};
use std::net::TcpListener;
use std::thread;
const BIND_ADDR: &str = "127.0.0.1:1337";
const MAX_MSG_SIZE: usize = 32;
fn sleep() {
thread::sleep(::std::time::Duration::from_millis(100));
}
fn main() {
let mut clients = vec![]
.push(stream1)
.push(stream2)
.push(stream3);
for client in &clients {
if client.can_recv() {
// now i want to send this message to every connectede
// client. and if there is an error i want to
package main
import "fmt"
const (
debugLevel = iota
infoLevel
warnLevel
errorLevel
fatalLevel