Skip to content

Instantly share code, notes, and snippets.

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 / 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];
# Commands to be executed directly by this shell.
BUILTINS = {}
# The builtin `cd` for changing the shell's working directory.
BUILTINS['cd'] = lambda do |args|
# Change to the home directory by default.
args << ENV['HOME'] if args.empty?
# Read the destination path, doing very basic path expansion.
dest = args.pop.gsub(/~/, ENV['HOME'])
@nixpulvis
nixpulvis / fib
Last active June 26, 2018 18:19
Fibonacci (again)
#!/usr/bin/env elixir
defmodule Math do
def fibfast(n) do fib_acc(1, 0, n) end
def fib_acc(a, b, 0) do a + b end
def fib_acc(a, b, n) do fib_acc(b, a+b, n-1) end
def fibslow(0) do 1 end
def fibslow(1) do 1 end
def fibslow(n) do fibslow(n-1) + fibslow(n-2) end
@nixpulvis
nixpulvis / slack-one.colors
Last active June 6, 2018 06:33
Slack Theme
#282c34,#535A69,#abb2bf,#282c34,#535a69,#ABB2BF,#98c379,#e06c75
@nixpulvis
nixpulvis / server.rb
Created May 30, 2018 20:13
SO_REUSEPORT
require "socket"
PORT = 1234
server = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM)
# NOTE: Commentting out this line will prevent multiple processes to run at
# once on the same port.
server.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEPORT, true)
server.bind(Addrinfo.tcp("", PORT))
@nixpulvis
nixpulvis / segv.c
Last active March 19, 2020 21:18
Intel pthreads Issue
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
static pthread_t thread;
static pthread_mutex_t mutex;
void* work(void* ptr)
{
pthread_detach(pthread_self());
@nixpulvis
nixpulvis / data.json
Created September 8, 2017 21:33
D3 Hierarchical Data
{
"name": "Root Node",
"children": [
{ "name": "Child 1", "children": [] },
{ "name": "Child 2", "children": [
{ "name": "Child 3", "children": [] }
]}
]
}