Skip to content

Instantly share code, notes, and snippets.

@antlionguard
antlionguard / twitter-remove-retweets.js
Last active August 15, 2025 23:06
With this script, you can remove all retweets you are retweeted on Twitter.
const timer = ms => new Promise(res => setTimeout(res, ms));
// Unretweet normally
const unretweetTweet = async (tweet) => {
await tweet.querySelector('[data-testid="unretweet"]').click();
await timer(250);
await document.querySelector('[data-testid="unretweetConfirm"]').click();
console.log('****// Unretweeted Successfully //****')
}

When we started coding on NuKeeper, things were different - there were automated update tools for other ecosystems, but not for .NET, and I was working with a lot of services with a lot of dependencies. Most (but not all) of these at my work were solutions in .NET full framework version 4.6.2 or the like.

I tried to find the .NET support on "Greenkeeper" before realising what the docs didn't even feel the need to spell out: this was for node.js and NPM, only. So there was a gap and a need for .NET package automation.

Well, things changed. Most notably, Dependabot got .NET Core support, and was acquired by GitHub, which was in turn acquired my Microsoft.
Automated package update management is a win for developers, so this is good for people working in .NET.

@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active August 9, 2025 07:15
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@richlander
richlander / sdk-size-improvements.md
Created July 23, 2019 16:32
.NET Core 3.0 SDK Size Improvements

.NET Core 3.0 SDK Size Improvements

The .NET Core SDK is significantly smaller with .NET Core 3.0. The primary reason is that we changed the way we construct the SDK, by moving to purpose-built “packs” of various kinds (reference assemblies, frameworks, templates). In previous versions (including .NET Core 2.2), we constructed the SDK from NuGet packages, which included many artifacts that were not required and wasted a lot of space.

The following sections demonstrate the size improvements for Windows, Linux and macOS, including container delivery. They detail the process and commands that were used to determine the product sizes, enabling you to reproduce the same results in your own environment. To keep thing simple, zips and tar balls were downloaded from dotnet/core-sdk as opposed to the official installers.

Some readers will be shocked on how large the .NET Core 2.2 installer directory grows when the NuGetFallback archive is expanded to the NuGetFallBackFolder. W

@gtnsimon
gtnsimon / doctrine_validator_swagger.md
Last active February 26, 2024 12:14
Doctrine ORM + Symfony Validator + Swagger-PHP annotations living together 🙌❤

This solve Exceptions below :

  • Doctrine\Common\Annotations\AnnotationException : [Semantical Error] The annotation "..." in property Class::$property does not exist, or could not be auto-loaded.
  • Doctrine\ORM\Mapping\MappingException : Class "..." is not a valid entity or mapped super class.

Packages

@wdormann
wdormann / disable_win10_foistware.reg
Created January 2, 2018 23:15
Attempt at disabling Windows 10 automatic installation of 3rd-party foistware
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy]
"Disabled"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager]
"SubscribedContent-338388Enabled"=dword:00000000
@gte445e
gte445e / docker-pull-all-images.ps1
Created May 28, 2017 19:07
Docker Pull/Update Images using PowerShell
# Pull all images
docker images --format "{{.Repository}}" | %{docker pull $_}
@a4099181
a4099181 / Convert-ToPackageReference.ps1
Last active February 18, 2021 07:00
Converts packages.config into PackageReference at *.csproj project file. Requires XSLT stylesheet available as second file in the gist.
Function Convert-ToPackageReference
{
Param ( [Parameter( Mandatory, ValueFromPipeline )][String] $inputUri,
[String] $stylesheetUri = "https://gist.githubusercontent.com/a4099181/074a6c3dd524ea0d343382137492399c/raw/cdd0fb31efd70c4c0f8c86ddb314de86ab8972e8/Convert-ToPackageReference.xsl",
[String] $resultsFile = [System.IO.Path]::GetTempFileName() )
Process {
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform
$xslt.Load( $stylesheetUri )
$xslt.Transform( $inputUri, $resultsFile )
@markryd
markryd / convert-toxunit.ps1
Last active July 12, 2019 13:33
Do a rough conversion from nunit to xunit + fluentassertions
$testFolder = "C:\dev\Calamari\source\Calamari.Tests"
Function Convert-ToXunit {
Param(
[System.IO.FileInfo]$file
)
$result = (Get-Content $file.FullName -Raw) `
-replace 'using NUnit.Framework;', 'using Xunit;' `
-replace '\[Test\]', '[Fact]' `
@douglas
douglas / update_git_repos.sh
Created October 14, 2011 15:04
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do