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 Remove published releases from GitHub feed | |
// @namespace Violentmonkey Scripts | |
// @match https://github.com/ | |
// @grant none | |
// @version 1.0 | |
// @author Owen Trueblood | |
// @description Remove published releases from GitHub feed | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js |
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 sys | |
import cv2 | |
import zmq | |
import base64 | |
import numpy as np | |
context = zmq.Context() | |
footage_socket = context.socket(zmq.SUB) | |
footage_socket.connect('tcp://localhost:5555') |
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
export function flipPointOverLine(linePoint1, linePoint2, point) { | |
// Calculate the vector that represents the line direction | |
const lineVector = vec3.create(); | |
vec3.subtract(lineVector, linePoint2, linePoint1); | |
vec3.normalize(lineVector, lineVector); | |
// Calculate the projection of the point onto the line | |
// relative to the start of the line | |
const pointToLinePoint1 = vec3.subtract(vec3.create(), point, linePoint1); | |
const dotProduct = vec3.dot(pointToLinePoint1, lineVector); |
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
void print_thread_stack_usage() { | |
struct k_thread* thread = k_current_get(); | |
size_t stack_space; | |
k_thread_stack_space_get(thread, &stack_space); | |
printk("Thread has %u bytes of stack space left.\n", stack_space); | |
} |
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
# Reports | |
*.rpt | |
# CPL data generated from PCB | |
*.pos | |
# KiCad backup | |
*.bak | |
*.bck | |
*.kicad_pcb-bak |
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
function threadHasLabel(thread, labelName) { | |
var existingLabels = thread.getLabels(); | |
for (var i = 0; i < existingLabels.length; i++) { | |
if (existingLabels[i].getName() === labelName) { | |
return true; | |
} | |
} | |
return false; |
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
SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fd92", SYMLINK+="ttyAxiDraw", RUN+="/bin/sh -c 'socat -s /dev/ttyS0,raw,echo=0,ignoreeof,iexten=0,b115200 /dev/ttyAxiDraw,raw,echo=0,ignoreeof,iexten=0,b115200'" |
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
function fooBar() { | |
console.log('hello world!'); | |
} |
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
let reader; | |
let writer; | |
let connected = false; | |
let wasConnected = false; | |
let drawing = false; | |
const encoder = new TextEncoder(); | |
const decoder = new TextDecoder(); | |
let lastX = 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
# https://github.com/facebook/react-native/issues/28405#issuecomment-827421253 | |
post_install do |installer| | |
## Fix for XCode 12.5 beta | |
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm", | |
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules") | |
find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm", | |
"RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))") | |
end |