Skip to content

Instantly share code, notes, and snippets.

@claudenobs
claudenobs / SteamShortcutCreator.ps1
Last active December 2, 2018 14:13
Creates shortcuts to all your steam games. Icons are taken either from steam installation downloaded or game executable.
# 0. Requires steamcmd. Download from https://developer.valvesoftware.com/wiki/SteamCMD. Put it in your steam directory (the one with steam.exe)
# 1. Save this script by right-click on Raw button and choose "Save link as..."
# 2. Start powershell : right click "Start" then choose "Run..." & type : powershell
# 3. Run script type : Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Unrestricted -NoExit -file `"$Home\Downloads\SteamShortcutCreator.ps1`""; exit
# 4. Give permission in pop-up
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$steamDir = if (Test-Path "C:\Program Files (x86)\Steam\steam.exe") { "C:\Program Files (x86)\Steam" }
elseif ($args[0] -and (Test-Path "$($args[0])\steam.exe")) { $args[0] }
elseif (Test-Path "$PSScriptRoot\steam.exe") { $PSScriptRoot }
elseif (Test-Path ".\steam.exe") { "." }
@Twoure
Twoure / kissanime_onedrive_video_files.py
Last active May 27, 2021 07:25
kissanime, kisscartoon, and kissasian have videos hosted on OneDrive. This code returns the raw mp4 file.
#!/usr/bin/env python
"""
Kissanime.to, Kisscartoon.me, and Kissasian.com have some videos hosted on OneDrive.
The URL's below are examples taken from there pages.
You will have to first parse the kiss site video page to get the embeded OneDrive URL.
"""
from lxml import html
import re
import json
--- g7uj18us.iso.orig.hex 2016-04-27 17:27:53.147134773 +1000
+++ g7uj18us.iso.hex 2016-04-27 17:27:41.682934788 +1000
@@ -8554,8 +8554,8 @@
00021690 00 00 00 00 00 00 00 00 9f 1b 44 00 85 24 00 00 |..........D..$..|
000216a0 43 4f 4e 46 49 47 20 20 53 59 53 20 00 00 00 00 |CONFIG SYS ....|
000216b0 00 00 48 41 00 00 e8 6c 8f 3a 49 00 7b 00 00 00 |..HA...l.:I.{...|
-000216c0 41 55 54 4f 45 58 45 43 42 41 54 20 00 00 00 00 |AUTOEXECBAT ....|
-000216d0 00 00 88 38 00 00 e9 92 84 38 4a 00 3a 00 00 00 |...8.....8J.:...|
+000216c0 41 55 54 4f 45 58 45 43 42 41 54 20 00 00 6f 8b |AUTOEXECBAT ..o.|
+000216d0 9b 48 9b 48 00 00 6f 8b 9b 48 4a 00 0e 02 00 00 |.H.H..o..HJ.....|
@theit8514
theit8514 / powershell-web-server.ps1
Last active May 27, 2020 09:47 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
param(
[int]$Port = 8080
);
$routes = @{
"/ola" = { return '<html><body>Hello world!</body></html>' }
}
$url = "http://localhost:$Port/"
$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add($url)
@rainabba
rainabba / README.md
Last active November 13, 2022 05:09
Building ffmpeg on AWS Linux AMI (G2 instance)

First, I should be clear that this was done on a G2 AWS instance and I started with working nvidia support by following http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html

From that (or if you're feeling more bold), the thing to take is getting the right binary install package and running it. Look at http://www.nvidia.com/object/unix.html and get the package you want (at the time, I'm using 'Latest Long Lived Branch version: 361.45.11'), then run the file you get. For example, sudo sh ./NVIDIA-Linux-x86_64-361.45.11.run.

I do not have time to test on a clean instance so you may need a bit more setup that I've not mentioned and I make no guarantees anyway since I hardly know what I'm doing here :)

The ffmpeg_build.sh script was mostly copy/paste from the guide at https://trac.ffmpeg.org/wiki/CompilationGuide/Centos and with significant help from folks on FreeNode #ffmpeg (notably furq and JEEB though there were others).

The steps for adding OpenCL headers support was borrowed

@Brainiarc7
Brainiarc7 / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Last active September 2, 2024 14:37
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@dbirks
dbirks / speedtest-cli-edgerouter.md
Last active July 1, 2024 00:36
Make a Speedtest log on a Ubiquity Edgerouter

Tested on an Edgerouter Lite, EdgeOS 1.9.0

Enable the Wheezy repo

configure
set system package repository wheezy components 'main contrib non-free'
set system package repository wheezy distribution wheezy 
set system package repository wheezy url http://http.us.debian.org/debian
commit
save
@MarkTiedemann
MarkTiedemann / download-latest-release.ps1
Last active January 5, 2025 10:28
Download latest GitHub release via Powershell
# Download latest dotnet/codeformatter release from github
$repo = "dotnet/codeformatter"
$file = "CodeFormatter.zip"
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
@65
65 / mailchimp-googlescript.txt
Last active January 15, 2022 17:15
On Google Spreadsheet / Google Form submission, push new entry to a MailChimp subscription list with an `onformsubmit` trigger. Uses the MailChimp 3.0 API and Google Apps Script.
/**
* Mailchimp API v3
* Add a subscriber to a list with interests on Google Form submit
*
* Updated to 3.0 from https://gist.github.com/acarrillo/5772508
*
* Edit the Google Sheet connected to your form
* Menu > Tools > Script Editor
* Copy and paste this into the file, remove anything there already
* Update the variables in the top section
@derofim
derofim / MyActor.cpp
Last active October 10, 2023 20:02
UE4 logging, Overlap & Hit events, playing sounds, Actor location, Particle System Parameter
// Fill out your copyright notice in the Description page of Project Settings.
#include "SCP.h"
#include "MyActor.h"
#include <EngineGlobals.h>
#include <Runtime/Engine/Classes/Engine/Engine.h>
// https://wiki.unrealengine.com/Logs,_Printing_Messages_To_Yourself_During_Runtime#Related_Tutorial
#define print(text) if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 1.5, FColor::White,text)