Skip to content

Instantly share code, notes, and snippets.

@nixpulvis
nixpulvis / unicode.txt
Created January 27, 2020 16:17
Test Unicode File
From xiangkangzzz@163.com Sat Sep 28 21:28:52 2019
Date: Sat, 28 Sep 2019 12:23:51 +0800
From: 0 <xiangkangzzz@163.com>
Reply-To: billie@joawamould.com
Subject: E-017-00260_28
Message-ID: <201909281224045885357@163.com>
X-Mailer: Foxmail 7, 0, 1, 91[cn]
Dear ask
@nixpulvis
nixpulvis / fullscreen.c
Created December 4, 2013 19:12
Fullscreen OpenGL with GLUT
#if defined(__APPLE__)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#include <GLUT/glut.h>
#include <stdio.h>
@nixpulvis
nixpulvis / windows_install.sh
Created February 7, 2019 21:07
Install Windows 10 From Linux
fdisk /dev/sdY
# create single partition type 7+bootable partition
mkfs.ntfs -f /dev/sdY1
ms-sys -7 /dev/sdY
mount -o loop win7.iso /mnt/iso
mount /dev/sdY1 /mnt/usb
cp -r /mnt/iso/* /mnt/usb/
@nixpulvis
nixpulvis / process.rs
Last active September 28, 2019 19:26
Simple Rust Threaded TCP Client Server
use std::io::prelude::*;
use std::thread;
use std::net::{TcpStream, TcpListener};
fn network_process() {
let listener = TcpListener::bind("127.0.0.1:1337").unwrap();
let mut handlers = Vec::new();
match listener.accept() {
Ok((mut socket, addr)) => {
@nixpulvis
nixpulvis / fonts.conf
Created July 1, 2019 17:19
Fontconfig for (~/.config/fontconfig/fonts.conf)
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>Fira Mono</string>
</edit>
Here's how to do the iPhone FaceTime bug:
• Start a FaceTime Video call with an iPhone contact.
• Whilst the call is dialling, swipe up from the bottom of the screen and tap Add Person.
• Add your own phone number in the Add Person screen.
• You will then start a group FaceTime call including yourself and the audio of the person you originally called, even if they haven't accepted the call yet.
#include QMK_KEYBOARD_H
enum mitosis_layers
{
_QWERTY,
_SHIFTED,
_FUNCTION,
_FUNCSHIFT,
};
@nixpulvis
nixpulvis / animal.rb
Created January 6, 2019 22:01
Do the Splits
module Sustenance
def initialize
@stomach = []
super
end
def eat(food)
@stomach << { food: food }
end
@nixpulvis
nixpulvis / proxy.rs
Last active November 29, 2018 13:09
// extern crate take5;
// extern crate remote;
use std::io::{Read, Write};
use std::net::{SocketAddr, TcpStream, TcpListener, Shutdown};
use std::thread;
use std::time::Duration;
use std::sync::{Arc, Mutex};
// use take5::player::AiPlayer;
// use remote::Client;
@nixpulvis
nixpulvis / rev.html
Created September 26, 2018 14:17
Webkit Fail
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>iOS 12 Safari bugs</title>
<script type="text/javascript">
window.addEventListener("load", function ()
{
let arr = [1, 2, 3, 4, 5];