import PIL.Image # pip install pillow
img = PIL.Image.open('en.png')
width, height = img.size
stream = ''
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// 1 2 3 simple math | |
#define x (argc / 12 % (3 * (1 + 2)) + 3 - 1 + 2 - 3) | |
#define y (argc / 12 / 3 / (1 + 2) + 3 - 1 + 2 - 3) | |
#define z x * y | |
int main(int argc, char *argv[]) | |
{ | |
return argc > 970 /* can't afford 1080 :( */ ? 0 : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang="pug"> | |
div(v-show="activated") | |
slot | |
</template> | |
<script> | |
export default { | |
created () { | |
if (this.active) { | |
this.$parent.$emit('active', this) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AntiBlockAdblock | |
// @namespace https://www.r3sub.com/ | |
// @version 0.1 | |
// @description Fuck you and I love Adblock | |
// @author Inndy | |
// @match https://*.r3sub.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
def hash(data): | |
trail = struct.pack("I", len(data)) | |
v = 0x44556677 | |
v2 = 0x94879487 | |
for i in bytearray(data + trail): | |
v = ~v ^ (v * 1231) ^ ((i + 345) * 123123557) ^ (v << 7) + i | |
v &= 0xffffffff | |
return v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
io = remote('quiz.ais3.org', 4869) | |
def format(fmt): | |
io.sendline('1') | |
io.sendlineafter('What do you want to say : ', fmt) | |
io.recvuntil('You say : ') | |
return io.recvuntil('*' * 27)[:-27] |
- Download
virtio-win.iso
for KVM drivers - Run
qemu
manually, don't relay on libvirt
qemu-system-x86_64 --enable-kvm \
-smp 4 -m 4096 -cpu host -vga qxl \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qs = 'https://example.com/?a=b&cc=I%20can%27t%20fix%20it&kk=box' | |
function parseQueryString(url) | |
{ | |
var result = {}; | |
var qstr = ('?' + url).replace(/.*\?/, ''); // get query string from url | |
qstr.split('&') // split by '&' | |
.map(item => item.split('=', 2)) // split pairs | |
.forEach(pair => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class RecordViewController: UIViewController { | |
@IBAction func closeOverlay(_ sender: Any) { | |
self.view.window?.resignKey() | |
self.view.window?.isHidden = true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
last -i | grep -o ' \([[:digit:]]\+\.\)\{3\}[[:digit:]]\+ ' | while read ip; do | |
geoiplookup $ip | grep -v "can't resolve" | cut -d ' ' -f 4-5 | |
done | sort | uniq -c | sort -n |