Skip to content

Instantly share code, notes, and snippets.

@M1chaelTran
M1chaelTran / WebStorm.cmd
Created August 17, 2017 11:04
Add `Open with WebStorm` to Windows right click context menu
@echo off
:: change the path below to match your installed version
SET WebStormPath=C:\Program Files\JetBrains\WebStorm 2017.2.2\bin\webstorm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%1\"" /f
@Sh4yy
Sh4yy / clx.go
Created April 25, 2024 20:39
Generate CLI commands for common tasks.
package main
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"runtime"
@tdamsma
tdamsma / migrating-away-from-docker-desktop.md
Last active April 26, 2024 13:28
Running VSCode remote containers on windows without docker desktop

Running VSCode remote containers on windows without docker desktop

Due to the license issues with docker desktop and the fact that you don't really need this buggy bit of software, this guide will walk you through the steps to use VSCode+remote-containers in combination with WSL2 without using docker desktop.

Get rid of docker desktop

Only if you have docker desktop currently installed of course

Uninstall docker desktop application

@ldong
ldong / zshrc.txt
Created April 29, 2018 04:04
zshrc
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
@atulkadian
atulkadian / setup.sh
Last active April 26, 2024 13:26
EC2 Setup for node apps
#!/bin/sh
# Copyright (C) 2024 Atul-Kadian
echo "Updating Packages ..."
sudo apt-get update
echo "Install Nginx ..."
sudo apt install nginx -y
echo "Installing Certbot ..."
package seed
import (
"log"
"github.com/jinzhu/gorm"
"github.com/victorsteven/fullstack/api/models"
)
var users = []models.User{
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 26, 2024 13:24
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@samsamm777
samsamm777 / gist:7230159
Last active April 26, 2024 13:24
PHP set private property value using reflection. This allows you to set a private property value from outside the object, great for PHPUnit testing.
<?php
$a = new A();
$reflection = new \ReflectionClass($a);
$property = $reflection->getProperty('privateProperty');
$property->setAccessible(true);
$property->setValue($a, 'new-value');
echo $a->getPrivateProperty();
//outputs:
@vaughany
vaughany / kill-pulse-vpn.sh
Last active April 26, 2024 13:24
Small script to kill the Pulse VPN service and UI, 'cos they seem to hang sometimes, for no reason.
#!/bin/bash
# Finds and kills the Pulse Secure VPN background service and UI.
if [[ $EUID -ne 0 ]]; then
echo -e "\e[1;41mThis script must be run as root.\e[0m"
exit 1
fi
IDS=$(ps -ax | grep -i 'pulse[ui|svc]' | tr -s ' ' | sed 's/^ *//g' | cut -d ' ' -f 1)
@nightuser
nightuser / use_existing_session.patch
Last active April 26, 2024 13:22
Use existing Xorg session for chrome-remote-desktop
Add an option to use the existing Xorg session with
chrome-remote-desktop.
The original idea of the patch: https://superuser.com/a/850359
--- a/chrome-remote-desktop 2024-03-27 16:03:20.518579015 +0000
+++ b/chrome-remote-desktop 2024-03-27 16:17:58.241912847 +0000
@@ -110,6 +110,8 @@
X_LOCK_FILE_TEMPLATE = "/tmp/.X%d-lock"
FIRST_X_DISPLAY_NUMBER = 20