Skip to content

Instantly share code, notes, and snippets.

@jakeajames
jakeajames / poc.c
Last active May 1, 2023 19:58
CVE-2021-30955 PoC
#include <stdlib.h>
#include <stdio.h>
#include <pthread/pthread.h>
#include <mach/mach.h>
struct ool_msg {
mach_msg_header_t hdr;
mach_msg_body_t body;
mach_msg_ool_ports_descriptor_t ool_ports[];
};
This is a program that can answer questions about a given text.
Text:
/Page 1/
[An illustration of a standing bear]
My hat is gone. I want it back.
/Page 2/
[An illustration of a bear and a fox]
Have you seen my hat? *No, I haven't seen your hat.* OK. Thank you anyway.
/Page 3/
@dpoulopoulos
dpoulopoulos / nlsh.py
Last active May 20, 2024 04:45
OpenAI natural language shell example.
prompt = """
Input: Print the current directory
Output: pwd
Input: List files
Output: ls -l
Input: Change directory to /tmp
Output: cd /tmp
@osipxd
osipxd / !paper-versions.md
Last active October 30, 2024 11:27
Paper versions links
@jianwu
jianwu / mshell
Last active September 18, 2024 12:20
mshell: to run jshell for a maven project with all the dependancies injected.
# Run this script from the maven module directory to start a jshell with
# all dependent class paths injected.
# Please never run it on the parent maven project directory.
# It depends on java9 or above
if [ ! -d "target" ]; then
echo "Please run it under a module directory. And make sure it's not parent module directory. And make a maven install first"
exit
fi
@systemdarena
systemdarena / arch-chroot
Created November 14, 2016 17:14
arch-chroot for fedora
#!/bin/bash
shopt -s extglob
# generated from util-linux source: libmount/src/utils.c
declare -A pseudofs_types=([anon_inodefs]=1
[autofs]=1
[bdev]=1
[binfmt_misc]=1
[cgroup]=1
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active November 7, 2024 05:04
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@c-kick
c-kick / hnl.mobileConsole.js
Last active October 4, 2024 12:20
NOTE: V2 Released! Seehttps://github.com/c-kick/mobileConsole hnl.mobileConsole.js - extends JavaScript's console to display a visual console inside the webpage. Very usefull for debugging JS on mobile devices with no real console. Info and demo: http://www.hnldesign.nl/work/code/mobileconsole-javascript-console-for-mobile-devices/
/*!
*
* NEW VERSION AT https://github.com/c-kick/mobileConsole
*
* hnl.mobileConsole - javascript mobile console - v1.3.8 - 04/01/2021
* Adds html console to webpage. Especially useful for debugging JS on mobile devices.
* Supports 'log', 'trace', 'info', 'warn', 'error', 'group', 'groupEnd', 'table', 'assert', 'clear'
* Inspired by code by Jakub Fiala (https://gist.github.com/jakubfiala/8fe3461ab6508f46003d)
* Licensed under the MIT license
*
@mfikes
mfikes / log.txt
Created May 15, 2015 12:45
React Native JSC JIT
[16:53:32] <kjeldahl> Is the comment about the JavaScript Runtime not running with JIT still true, after iOS 8?
[16:59:53] <ide> kjeldahl: yes no JIT unless you run it out of process which is laggy
[17:01:02] <ide> not sure if the JIT matters that much though. like I’m curious if an iphone 6 without the JIT beats a 4s with the JIT
[17:02:25] <kjeldahl> ide: Ok, thx.