Skip to content

Instantly share code, notes, and snippets.

View timvisee's full-sized avatar
Consuming coffee

Tim Visée timvisee

Consuming coffee
View GitHub Profile
@Belorum
Belorum / Firefox Send for Windows Command Line.ps1
Created March 14, 2019 09:30
This script will download the command line tool for Firefox Send that was created by Tim Visée and place it directly into your C:\Windows\System32\ folder so that it is accessible via the command line on your system.
<#
Downloads FireFox Send executable made by Tim Visée - https://github.com/timvisee/ffsend/releases
Current Version ffsend v0.2.30 as of 03-14-19
Script made by John Davis @John_Davis - https://github.com/Belorum
#>
Net Session 2>&1 > $null
if ( $? -eq "False" ) {
$Current_Time = Get-Date
@aadnk
aadnk / NbtFactory.java
Last active December 29, 2020 04:29
A compact library for editing or creating NBT tags, ready to be inserted into your project. It doesn't directly depend on CraftBukkit, but uses reflection to access it dynamically. Use this version for 1.7.2: http://tinyurl.com/attributestorage
package com.comphenix.example;
import java.io.BufferedInputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
function fish_mode_prompt --description 'Displays the current mode'
# Do nothing if not in vi mode
if test "$fish_key_bindings" = "fish_vi_key_bindings"
switch $fish_bind_mode
case default
set_color --bold red
echo 🅽
case insert
set_color --bold green
echo 🅸
Pipeline Pipeline io_uring Non-pipelined Non-pipelined io_uring
CPU 99 50 (-50%) 97 48 (-50%)
RPS 2,592,670 2,878,222 (+11%) 497,429 631,976 (+26%)
Working set 79 81 79 81
Latency (mean) 1.28 0.98 1.07 1.47
Latency (99th) n/a 7.57 14.8 14.67
@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@timvisee
timvisee / Head.php
Last active March 14, 2022 14:57
MCDragonRealms Minecraft player head avatar class.
<?php
/**
* MCDragonRealms Minecraft player head avatar class.
*
* This class is able to generate player avatars based on any Minecraft player skin.
*
* Use the `p` GET param when doing direct HTTP requests to this file to set the avatar type, size and username. (p=TYPE/SIZE/USERNAME)
*
* Current supported types are (as you can see at the bottom of the script):
@juxtin
juxtin / vim74centos
Last active May 2, 2022 03:45
Compile Vim 7.4 on Centos and install my vimrc
#!/bin/bash
yum groupinstall 'Development tools' -y
yum install ncurses ncurses-devel wget git -y
cd /usr/local/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjf vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp
make && make install
@timvisee
timvisee / exchange.php
Last active August 6, 2022 16:59
Live currency exchange script, to retrieve the current exchange rates betwee to currencies, live from the internet.
<?php
/**
* Live currency exchange script.
* This script allows you to retrieve the current currency exchanges, live, from the internet.
*
* This script is developed by Tim Visee, for educational purposes.
* The Yahoo currency exchange API is used to retrieve the live exchange rates.
*
* ---
#include <windows.h>
void SetWindowBlur(HWND hWnd)
{
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll"));
if (hModule)
{
@RoccoDev
RoccoDev / hash.rs
Last active May 8, 2023 15:36
Minecraft SHA-1 complement hash calculation in Rust
// Copyright (C) 2019 RoccoDev
// Licensed under the MIT license.
// <https://opensource.org/licenses/MIT>
// Bench results:
// First hash: 152ms
// Second hash: 1ms
// Third hash: 0ms
extern crate crypto; // Tested with 0.2.36