Skip to content

Instantly share code, notes, and snippets.

@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@HimDek
HimDek / Install Windows Subsystem for Android on any Edition of Windows 11 non Insider.md
Last active September 20, 2024 05:42
This Guide will show you how to Install Windows Subsystem for Android or WSA on any Edition of Windows 11 non Insider release.

Install Windows Subsystem for Android on Windows 11 non Insider

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow this guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • A Device with any version and Edition of Windows 11 installed.
  • Internet Connection.
  • Hyper-V enabled.

Enable Hyper-V:

@thomasklemm
thomasklemm / chromedriver.rb
Last active September 20, 2024 05:42
Chromedriver settings for headless Chrome in RSpec/Rails, with switching between different drivers based on command line settings
# ChromeDriver for JavaScript enabled feature/system specs
#
# Example usage:
# `$ bin/rspec` # Chrome in Headless Mode (Default)
# `$ SHOW_BROWSER=true bin/rspec` # Chrome
# `$ SHOW_BROWSER=true DEVTOOLS=true bin/rspec` # Chrome with Devtools
require 'selenium/webdriver'
Capybara.register_driver :chrome do |app|
@xbalaji
xbalaji / oneliners-aws-ssm.sh
Last active September 20, 2024 05:30
aws ssm cli
export AWS_DEFAULT_PROFILE=""
# to display parameter store variables for aws latest linux
aws ssm get-parameters-by-path --path "/aws/service/ami-amazon-linux-latest" --region us-west-2
# get the list of parameter store variables in the account
aws ssm describe-parameters | jq '.Parameters[].Name'
# remove the last path and filter higher level path
aws ssm describe-parameters | jq '.Parameters[].Name' | sed -e 's,\(.*\)/.*,\1",g' | sort | uniq
@CostasAK
CostasAK / one-dark-pro.json
Created February 22, 2021 14:35
Windows Terminal One Dark Pro
{
schemes: [
{
"name": "One Dark Pro",
"foreground": "#abb2bf",
"background": "#282c34",
"cursorColor": "#abb2bf",
"black": "#3f4451",
"red": "#e05561",
"green": "#8cc265",
@hanxiao
hanxiao / testRegex.js
Last active September 20, 2024 05:25
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@jamiephan
jamiephan / README.md
Last active September 20, 2024 05:45
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@isaumya
isaumya / cf_cache_rules_implementation_guide_spcc.md
Last active September 20, 2024 05:08
Super Page Cache for Cloudflare — Guide for using Remove Cache Buster Query Parameter feature (when using Cache Everything page rule)

Implementation Guide for using "Remove Cache Buster Query Parameter" feature

The Super Page Cache for Cloudflare plugin has recently added the feature for using the Cache Everything pagerule withing the ?swcfpc=1 cache buster query paramater. This opens up so many new doors where users previously had to use the Cloudflare Workers to remove the cache buster.

With this new option now users are able to take advantage of Cloudflare Cache Everything page rule and take it to the next level by using the new Rulesets released by Cloudflare. Basically this is achived by taking advantage of the all new Cache Rules feature implemented by Cloudflare.


Setp 1 — Setting up the Cache Rules inside your Cloudflare Dashboard

The first thing that you need to do is, log-in to your Cloudflare Dahsbord and go to the domain/zone doe which you are setting up the [Super Page Cache for Cloudflare](https://wordpress.org/plug