Skip to content

Instantly share code, notes, and snippets.

@hoangitk
hoangitk / Fresh Setup Computer.ps1
Created July 6, 2021 06:56
[Fresh Setup Computer] #computer
# Credit: internet
Set-ExecutionPolicy RemoteSigned
# Install Chocolatey https://chocolatey.org/install
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Install Boxstarter:
. { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
@hoangitk
hoangitk / Visual Studio Configuration.md
Last active August 24, 2021 05:50
[Visual Studio Configuration] #visualstudio

Visual Studio Configuration

  • Track Active Item in Solution Explorer: auto jump to active file in Solution Explorer

Browers

C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

--profile-directory=dev --auto-open-devtools-for-tabs -incognito 
@hoangitk
hoangitk / JS Array methods.js
Last active May 30, 2021 10:52
JS Array methods #js #tutorial
[■,■,■,■].map(■→●) ⇒ [●,●,●,●]
[■,●,■,▲].filter(■→true) ⇒ [■,■]
[■,●,■,▲].find(●→true) ⇒ ●
[■,●,■,▲].findIndex(●→true) ⇒ 1
[■,●,■,▲].fill(●) ⇒ [●,●,●,●]
[■,●,■,▲].some(●→true) ⇒ true
[■,●,■,▲].every(●→true) ⇒ false
[ ].some(●→true) ⇒ false
[ ].every(●→true) ⇒ true
@hoangitk
hoangitk / Better git logs.md
Created April 26, 2021 03:08
[Better git logs] #git
@hoangitk
hoangitk / MachineKeys.cs
Created April 8, 2021 05:40 — forked from cmcnab/MachineKeys.cs
Extracting current ASP.NET machine keys and setting them without committing them to the Web.config
namespace MyApp.Web.Security
{
using System;
using System.Configuration;
using System.Reflection;
using System.Web;
using System.Web.Configuration;
public class MachineKeys
{
@hoangitk
hoangitk / Surface Devices Slow Shutdown & Hanging Office Programs.md
Created February 27, 2021 11:07
[Surface Devices Slow Shutdown & Hanging Office Programs] #surface #troubleshooting

If the issue occurs in Safe Mode, try the methods listed below.

Method 1

Reset the power plans to default and see if the shut down time is reduced.

Search CMD from the Start menu and choose Command Prompt (admin). Copy paste the following command and hit Enter: powercfg –restoredefaultschemes Once the command is executed, shut down the machine to see if the issue persists.

@hoangitk
hoangitk / Git_init.md
Created December 1, 2020 05:02
[Git init] #git

Git Init

Get startd

  • push an existing repository from command line
git remote add origin https://your-git-server/your-repo
git push -u origin --all
@hoangitk
hoangitk / svelte-summit-2020-summary.md
Created November 26, 2020 09:06 — forked from vedam/svelte-summit-2020-summary.md
links and ressources from the svelte-summit-2020 talks

You'll find the talks here


Morgan Williams @mrgnw

The Zen of Svelte

Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.

@hoangitk
hoangitk / wsl2 gui.md
Created November 16, 2020 09:37
[wsl2 gui] #wsl #wsl2

GUI on Wsl2

How to

  1. INSTALL WSL 2
> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
--Restart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
--Restart
@hoangitk
hoangitk / appcmd_iis.md
Created November 11, 2020 05:17
[appcmd] #cmd #hosting #iis

Appcmd

  • Path: APPCMD=/c/windows/system32/inetsrv/appcmd.exe
  • Stop an apppool:
$APPCMD stop apppool /apppool.name:<your-apppool>