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
Get-PnpDevice -Class "Ports" | select -property "Status","InstanceId" | where -property "status" -value "Unknown" -EQ | foreach { pnputil /remove-device $_.InstanceId } |
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
param( | |
[string]$in, | |
[string]$out | |
) | |
if ([string]::IsNullOrEmpty($in) -or [string]::IsNullOrEmpty($out)) { | |
write-host "Specify input and output filenames" | |
exit 1 | |
} |
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
# eth0 interface to allow masquerading | |
nft add table ip nat | |
nft add 'chain ip nat postrouting { type nat hook postrouting priority 100 ; }' | |
nft add rule nat postrouting oif eth0 masquerade |
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
Get-ChildItem -Path <path/to/dir> -Filter "*.mov" | | |
ForEach-Object { | |
$new_name = $_.Name -replace '.mov','.mp4'; | |
ffmpeg -i "$($_.Name)" -c:v copy -c:a aac -b:a 320k "$new_name"; | |
} |
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
#!/bin/bash | |
# usage: verify.sh <ASC file name without extension> <signature filename> <file to verify> | |
# verify.sh 18A9236D file.sig file.txt | |
asc_filename="$1" | |
sig="$2" | |
file_to_verify="$3" | |
gpg -o ${asc_filename}.gpg --dearmor ${asc_filename}.asc |
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
.thumb_func | |
.align 2 | |
.globl mem_copy | |
.type mem_copy, %function | |
mem_copy: | |
cmp r1, r2 | |
itte ne | |
ldrne r3, [r0], #4 | |
strne r3, [r1], #4 | |
beq 1f |
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
syntax = "proto3"; | |
message SearchRequest { | |
string query = 1; | |
} | |
message Result { | |
repeated SearchRequest requests = 1; | |
} |
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
#include <stdio.h> | |
#include <ctype.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(void) | |
{ | |
char s[] = "CAFEDEADBEEF010203040506"; | |
size_t len = strlen(s); | |
unsigned char bytes[len / 2]; |
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
"<path/to/CrossWorks>\bin\crossscript.exe" -load "script.js" -verbose "count();" |
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
// string_carryover.c : Defines the entry point for the console application. | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define MAX_LINES 2 | |
#define MAX_LINE_LENGTH 14 | |
#define NULL_TERM_LINE_LENGTH (MAX_LINE_LENGTH + 1) | |
#define MIN_HYPHEN_CAP 4 |
NewerOlder