Skip to content

Instantly share code, notes, and snippets.

View guykisel's full-sized avatar
😸
sup?

Guy Kisel guykisel

😸
sup?
View GitHub Profile
@regner
regner / BuildProject.xml
Last active May 2, 2024 18:57
A sample BuildGraph script for building, cooking, and packaging an Unreal project.
<?xml version='1.0' ?>
<!--
Why is this one giant script instead of a bunch of smaller scripts?
Mostly this comes down to BuildGraph and personal preference. As the language BuildGraph isn't
really much of a programming language there is no easy way to use an IDE and jump between
includes, find usages of variables, and just generally quickly search things. It was found to
be easier to have a single large file that a developer can quickly jump up and down in when
trying to understand what the BuildGraph script is doing.
@comerford
comerford / get-ue5-custom-s3.ps1
Created March 22, 2023 19:57
Public rclone wrapper
param(
[Parameter(Mandatory=$true)]
[string]$access_key,
[Parameter(Mandatory=$true)]
[string]$secret_key,
[string]$path="c:\unreal-5.0"
)
# this asssumes that the custom UE5 that you want to download is in an S3 bucket and is in a self-extracting archive (7zip or similar)
# for the last version built, 225GB is needed at least, but we might be re-running, so need to get the current amount downloaded and subtract if present
$driveInfo = Get-PSDrive -PSProvider 'FileSystem' | Where-Object { $_.Name -eq $path[0] }
@rtfpessoa
rtfpessoa / nextdns.js
Last active January 14, 2024 02:05
nextdns.io Block Youtube Ads
// ID of the config, e.g. A1234BCD.
const configID = "A1234BCD";
// API key, found at the bottom of your account page in https://my.nextdns.io/account
const APIKey = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
// Mark true or false. If true, failed links will be retried 3 times at progressively increasing intervals.
// If false, failed links will not be retried.
const retryFailedLinks = true;
// Time delay between requests in milliseconds.
// 800 seems to not give any errors but is rather slow while anything faster will give errors (in limited testing).
// If you want to go lower, it is recommended that "retryFailedLinks" is true
@LanceMcCarthy
LanceMcCarthy / UltimateListIds.md
Last active May 5, 2024 22:09
List of Package Ids
Name Package Id Version Source
7Zip 7zip.7zip 19.0.0 winget
Altap Salamander salamander choco
Alt-Tab Terminator alt-tab-terminator choco
AutoHotkey Lexikos.AutoHotkey 1.1.33.02 winget
AutoHotkey Store Edition HaukeGtze.AutoHotkeypoweredbyweatherlights.com Latest msstore (via winget)
Carnac
@exhuma
exhuma / wincred.py
Last active February 26, 2024 10:15 — forked from mrh1997/wincred.py
Retrieve Windows Credential via Python
"""
Access windows credentials
Credentials must be stored in the Windows Credentials Manager in the Control
Panel. This helper will search for "generic credentials" under the section
"Windows Credentials"
Example usage::
result = get_generic_credential('foobar')
@raphaelcastaneda
raphaelcastaneda / lastpass_cli_helper.sh
Created January 31, 2019 01:49
Bash function to search lastpass cli and put passwords on your clipboard
function getpw() {
if [ $# -lt 1 ]; then
echo "Usage: getpw <LPASS_ENTRY>"
return 1
fi
options=$(lpass ls | egrep -i "$*")
count=$(echo "$options" | wc -l | sed 's/ //g')
if [ $count -gt 1 ]; then
echo "$options"
echo "Too many LastPass entries returned. Please pick from one of the above $count items."
@wavezhang
wavezhang / java_download.sh
Last active April 29, 2024 14:42
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@apremalal
apremalal / build.sh
Created August 17, 2016 01:26
Exclude vendor directory from goimports, go fmt,go install, go test ...
echo 'Formatting the code base...'
godep go fmt $(go list ./... | grep -v /vendor/)
echo 'Optimizing the imports...'
goimports -w $(go list -f {{.Dir}} ./... | grep -v /vendor/)
echo 'Installing dependencies. This might take some time...'
godep go install $(go list ./... | grep -v /vendor/)
echo "Executing test"
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active May 6, 2024 20:49
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"

npm shrinkwrap is useful, but maddening (once it's in place and you want to update a package).

Say you've got a package.json with module ember-cli as a devDependency currently at version 1.13.1. And you have an npm-shrinkwrap.json file too, generated with the --dev flag.

If you change the version of ember-cli to, say, 1.13.8 in package.json and run npm install, nothing will happen.

If you do that and manually change references in the shrinkwrap file, you will still have trouble (as nested dependencies may now be incorrect).

So what do we actually do?