Skip to content

Instantly share code, notes, and snippets.

View kprinssu's full-sized avatar

Kishor Prins kprinssu

  • Vancouver, British Columbia
View GitHub Profile
@rainx0r
rainx0r / README.md
Created November 19, 2021 11:09
CyberBoard R3 Fix Time Script
@sleirsgoevy
sleirsgoevy / ipv6-df-2.c
Last active March 8, 2021 15:34
FreeBSD 9 PoC of kernel code execution using the new TheFlow vulnerability
#include <sys/types.h>
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
@fauxpark
fauxpark / keymap.c
Last active March 26, 2023 20:48
rawhid in python
#include <string.h>
// This function is called when a packet is received on the raw HID interface.
// `length` will always be the size of the output (host to device) report in bytes - 32 in current QMK, but will eventually be raised to 64.
// Thus, if you wish to send variable length data, you should send the length along with the payload, splitting across multiple reports
// if needed, and handle the parsing yourself.
//
// In this simple example, we check that the first byte of the received data is the ASCII character 'A',
// in which case we respond with 'B' and toggle the backlight.
void raw_hid_receive(uint8_t *data, uint8_t length) {
@SharpEdgeMarshall
SharpEdgeMarshall / README.md
Last active April 7, 2020 01:06
Zoom.us Vaccine

Zoom.us Vaccine

To run the script please follow these instructions:

  • Launch Terminal (CMD+Space => digit “Terminal” => press Enter)
  • copy and paste inside the terminal and press enter:
    • curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
  • copy and paste inside the terminal and press Enter:
    • sudo bash ./zoomus_vaccine.sh
  • It will ask you for your mac account password
  • Insert 1 and press Enter
@bmatcuk
bmatcuk / create-usb.sh
Created May 30, 2019 04:38
Creating a Bootable Windows USB from ISO on a Mac
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
# This will output a bunch of info about all of the disk drives connected to
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is
# some number starting at 0. Now, insert your USB drive and run the command
# again. You should see a new entry. Make note of the name (ie, /dev/diskX).
diskutil list
@ljm42
ljm42 / rsyslog_copy
Last active June 11, 2023 06:52
copy custom rsyslog filter configurations for Unraid
#!/bin/bash
# copy custom rsyslog filter configurations
# latest version: https://gist.github.com/ljm42/f6d7d8f22d2965909f69c03df53529f6
#
# setup:
# 1. create the /boot/config/custom/rsyslog.d/ folder on your flash drive
# 2. place this script in that folder, name it rsyslog_copy
# 3. add this line to the top of your go script (before starting emhttp):
# bash /boot/config/custom/rsyslog.d/rsyslog_copy
#
@julianrubisch
julianrubisch / categories_controller.rb
Last active January 22, 2024 06:44
Dependent Select with StimulusJS
class CategoriesController < ApplicationController
def fields
render json: Field.where(category_id: params[:id]).order(:id)
end
end
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@lirenyeo
lirenyeo / bs4-cheatsheet.md
Last active May 30, 2022 01:40
Bootstrap 4 Utilities Cheatsheet

Bootstrap 4 Utilities Cheatsheet

Media Queries

1. up

Bootstrap 4 Mixins Compiled into
@include media-breakpoint-up(xs) @media (min-width: 0px)
@include media-breakpoint-up(sm) @media (min-width: 576px)
@include media-breakpoint-up(md) @media (min-width: 768px)
pm uninstall -k --user 0 com.google.android.apps.tachyon &&
pm uninstall -k --user 0 com.google.android.music &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.sheets &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.slides &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.docs &&
pm uninstall -k --user 0 com.google.android.videos &&
pm uninstall -k --user 0 com.android.gallery3d &&
pm uninstall -k --user 0 com.android.calendar &&
pm uninstall -k --user 0 com.evernote &&
pm uninstall -k --user 0 com.evernote.promohelper &&