Skip to content

Instantly share code, notes, and snippets.

View sitbon's full-sized avatar
🍄
Voraciously reading /dev/null

Phillip Sitbon sitbon

🍄
Voraciously reading /dev/null
  • Portland, OR, USA
  • 05:03 (UTC -07:00)
View GitHub Profile
@lostkagamine
lostkagamine / gshade_to_reshade_guide.md
Last active June 3, 2024 18:44
GShade -> ReShade migration guide for FFXIV

How To Move To ReShade From GShade

(a guide by sylvie (@lostkagamine). tested, should work fine.)

(Korean version / 한국어 버전 / Chinese version / 中文版)

New: FAQ has been updated for ReShade 5.7.0 features.

If you are having issues like the screen turning black, read the mini-FAQ at the bottom of this document!

0. Don't uninstall GShade yet!

@Virus610
Virus610 / pmri.md
Last active June 5, 2022 17:28
My experience doing drug trials at PMRI

Originally written January 2015: https://www.reddit.com/r/AskReddit/comments/tiy1pg/serious_what_is_the_easiest_legal_way_to_make/i1jg018/

Answers to questions can be seen here


I've done medical testing several times at Pharma Medica Research Inc in Scarborough. I can answer any questions you have about the process. I'll mention a few things I figure you're curious about. That said, all of this info is specifically about PMRI, I haven't done studies with any other companies.

  • I would do it again. If I could, anyway. It was a few years ago, and I've since lost a lot of weight, so my BMI isn't high enough (I'm below 19, which is about the cutoff point for most trials.)
@zOrg1331
zOrg1331 / wireguard_layer2.md
Last active June 16, 2024 19:27
wireguard, wireguard layer 2, wireguard over TCP

Intro

This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).

This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.

In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.

Objective

@kylemcdonald
kylemcdonald / Collect Parler Metadata.ipynb
Last active September 20, 2023 11:45
Collect video URLs and GPS data for Parler videos.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@queirozsc
queirozsc / models.py
Created May 25, 2020 16:20
Google Classroom API
import os
import pickle
from google.auth.transport.requests import Request # pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from django.db import models
from django.conf import settings
# Create your models here.
class Greeting(models.Model):
@adamhooper
adamhooper / c_clone.py
Last active December 16, 2023 23:27
Call Linux clone() from within Python
import ctypes
import os
import signal
from typing import Callable
libc = ctypes.CDLL("libc.so.6", use_errno=True)
# <linux/prctl.h>
PR_SET_NAME = 15
PR_SET_SECCOMP = 22
@aamishbaloch
aamishbaloch / sign-in-with-apple.md
Created October 8, 2019 14:58
Sign In with Apple using Django (Python) Backend

Implementing Sign In with Apple in your Django (Python) backend

Apple announced a new feature, "Sign In with Apple" enabling users to sign in to apps using their Apple ID. This new feature is meant to be a secure and privacy-friendly way for users to create an account in apps. Most iOS and Mac users already have an Apple ID, and this new feature lets them use that Apple ID to sign in to other apps and websites.

Apple is taking a firm stance to protect user's privacy, rather than letting applications see the user's real email address, they will provide the app with a fake or random email address unique to each app. Don't you worry! Developers will still be able to send emails to these proxy addresses, it just means developers won't be able to use the email addresses in any other way. This feature will also allow users to disable email forwarding per application.

How it works

Apple adopted the existing standards OAuth 2.0 and OpenID Connect to use as the foundation for their new API. If you're familiar

@t27
t27 / linux-oom-killer-fixes.md
Last active June 14, 2024 12:39
Dealing with the Linux OOM Killer

Dealing with the Linux OOM Killer at the program level

Do this in cases when you dont want to change the os-level settings, but only want to disable the OOM killer for a single process. This is useful when youre on a shared machine/server.

The OOM killer uses the process level metric called oom_score_adj to decide if/when to kill a process. This file is present in /proc/$pid/oom_score_adj. The oom_score_adj can vary from -1000 to 1000, by default it is 0.

You can add a large negative score to this file to reduce the probability of your process getting picked and terminated by OOM killer. When you set it to -1000, it can use 100% memory and still avoid getting terminated by OOM killer.

@dirkjonker
dirkjonker / nginx.conf
Last active December 5, 2022 11:10
NGINX JSON log configuration for Google Cloud / StackDriver log format
# this outputs JSON formatted logs which are easy to parse for any logging agent (such as fluentd)
# the format conforms to Google Cloud Logging so logs are nicely structured in the logs viewer
# see also: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest
# put the following lines in your nginx config
# /etc/nginx/nginx.conf
log_format json_combined escape=json
'{'
'"time":"$msec",'
@ismith
ismith / cc.png
Last active January 19, 2021 23:43
Dark's caption embedding script
cc.png