This file contains 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
static void escape(void *obj) { | |
asm volatile("" : : "g"(obj) : "memory"); | |
} | |
static void globber() { | |
asm volatile("" : : : "memory"); | |
} |
This file contains 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 <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#ifndef fatal | |
#define fatal(msg) \ | |
do { fprintf(stderr, "[FATAL]: %s:%i: %s: %s\n", __func__, __LINE__, msg, strerror(errno)); exit(EXIT_FAILURE); } while (0) | |
#endif | |
int create_bound_socket(const sa_family_t domain, const int protocol, const char* ip, const char* port) { |
This file contains 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 random | |
from PyQt5 import QtGui, QtWidgets | |
import time | |
from PyQt5.QtCore import Qt, QThread, pyqtSignal, QEvent | |
import itertools | |
class OpenGLWindow(QtGui.QWindow): | |
def __init__(self, parent=None): | |
super(OpenGLWindow, self).__init__(parent) | |
#quitAction = QAction("Exit", self, shortcut="Ctrl+Q", triggered=QApplication.instance().quit) |
This file contains 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
#!/usr/bin/env python3 | |
#Plaster your screen with hexagons! Exit with CTRL+Q | |
#Requires python3 (probably 3.4) and pyQt5 but is platform independent | |
#https://www.python.org/downloads/release/python-343/ | |
#http://www.riverbankcomputing.com/software/pyqt/download5 | |
from PyQt5.QtCore import QPoint, QSize, Qt, QTime, QTimer, QPropertyAnimation, QPointF, QThread, pyqtSignal, pyqtSlot | |
from PyQt5.QtGui import QColor, QPainter, QPolygon, QRegion, QPen, QFont, QPolygonF |
This file contains 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 KC Catalog Search | |
// @namespace https://gist.github.com/genericname462 | |
// @icon https://krautchan.net/favicon.ico | |
// @include https://krautchan.net/catalog/* | |
// @match https://*.krautchan.net/catalog/* | |
// @updateURL https://gist.github.com/genericname462/ee2cfeb69e5a4c31f48c/raw/kc_ce.user.js | |
// @downloadURL https://gist.github.com/genericname462/ee2cfeb69e5a4c31f48c/raw/kc_ce.user.js | |
// @version 0.0.15 | |
// @grant none |