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
const { execSync } = require('child_process'); | |
function deleteWorkflowRuns(username, reponame) { | |
if (!username || !reponame) { | |
console.log("Usage: deleteWorkflowRuns(username, reponame)"); | |
return 1; | |
} | |
console.log(`Fetching workflow runs for ${username}/${reponame}...`); |
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
var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
function playNote(frequency, duration,cancontinue) { | |
// create Oscillator node | |
var oscillator = audioCtx.createOscillator(); | |
oscillator.type = 'square'; | |
oscillator.frequency.value = frequency; // value in hertz | |
oscillator.connect(audioCtx.destination); | |
oscillator.start(); |
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
function discoverAllShadowRoots(){ | |
let shadowroots = [] | |
function discover(elem){ | |
let elemshadowroots = [...elem.querySelectorAll("*")] | |
elemshadowroots.push(elem) | |
elemshadowroots=elemshadowroots.map(z=>z.shadowRoot).filter(z=>z) | |
elemshadowroots.forEach(discover) | |
shadowroots.push(...elemshadowroots) | |
} |
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 <RCSwitch.h> | |
RCSwitch mySwitch = RCSwitch(); | |
int emit(int value=1008,int protocol=6,int wordlen=12) | |
{ | |
String must_send = intToBinaryWord(value,wordlen); | |
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 glob, os | |
def smart_remove_bg(folder,rem_color="#000000"): | |
for filename in glob.glob(folder.replace('"','').strip()): | |
out_fname = os.path.join(os.path.dirname(filename),"out-"+os.path.basename(filename)) | |
out_fname_xcf = os.path.join(os.path.dirname(filename),"xcf-"+os.path.basename(filename)+".xcf") | |
image = pdb.file_png_load(filename, filename) | |
drawable = pdb.gimp_image_get_active_drawable(image) | |
pdb.plug_in_colortoalpha(image, drawable, rem_color) |
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
<?php | |
foreach ([1] as $i) if ($condition) { // Breakable if | |
//some code | |
$a = "b"; | |
// Le break | |
break; | |
// code below will not be executed | |
} | |
for ($i=0; $i < 1 ; $i++) if ($condition) { | |
//some code |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<style> | |
body{ | |
background-color:#000048; | |
color:white; |
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 FAQ AutoAnswer | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @grant none | |
// ==/UserScript== | |
var nlist = []; |
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
widthheight=$(wm size | sed "s/.* //") | |
width=$(($(echo $widthheight | sed "s/x.*//g" )+0)) | |
height=$(($(echo $widthheight | sed "s/.*x//g" )+0)) | |
GetColorAtPixel () { | |
x=$1;y=$2; | |
rm ./screen.dump 2> /dev/null | |
screencap screen.dump | |
screenshot_size=$(($(wc -c < ./screen.dump)+0)); | |
buffer_size=$(($screenshot_size/($width*height))) | |
let offset=$width*$y+$x+3 |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<style>iframe,embed{width:90vw;height:90vh;}pre{background:lightgray;padding:10px} | |
</style> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | |
<h1>Test page for Moz-Ext-Ignore-X-Frame-Options</h1> | |
<h2>If content is <u>blocked</u>, you may want to |
NewerOlder