Skip to content

Instantly share code, notes, and snippets.

View nobitagamer's full-sized avatar

Nguyen Khac Trieu nobitagamer

View GitHub Profile
# Setup default environment for developers
# - Version: 1.4
# How to use:
#
# To run this script, you first have to install boxstarter using the following command (NOTE the "." below is required):
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Learn more: http://boxstarter.org/Learn/WebLauncher
#
# Run this BoxstarterDevFull.ps1 script by calling the following from **elevated** powershell:
# example: Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/nobitagamer/1e9d96abd4b8380c2394058ff7390a96/raw/ -DisableReboots
@nobitagamer
nobitagamer / README.md
Created September 3, 2020 09:47 — forked from AlinaNova21/README.md
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.

Prep

I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup

@nobitagamer
nobitagamer / deploy.cmd
Created January 5, 2018 04:45 — forked from benmccallum/deploy.cmd
Purge an Azure CDN cache with cURL, jq and deploy.cmd batch file
:: Below is an example of extending a deploy.cmd file (see kudu custom deployment scripts) to clear an Azure CDN endpoint
:: using the Azure Resource Manager (ARM) API with help of cURL.exe and jq.exe utils.
:: 4. Purge CDN cache of all caches files
:: Requires an application to be setup in the Azure Active Directory on the same tenant,
:: with a client id and key/secret, and permissions to the Azure CDN Endpoint (CDN Endpoint Contributor)
::SET CLIENT_ID="from-app-settings"
::SET CLIENT_SECRET="from-app-settings"
IF NOT DEFINED CLIENT_ID (
echo 4. Skipping Azure CDN cache purge. App Setting "CLIENT_ID" was not found. Potentially this is a local test deployment run.
@nobitagamer
nobitagamer / proxies.json
Created August 29, 2017 01:13 — forked from sjkp/proxies.json
Azure Function proxy support
{
"proxies": {
"ListAll": {
"desc": [
"This is the index of examples."
],
"matchCondition": {
"methods": [
"GET"
],
@nobitagamer
nobitagamer / choco-ibebiz
Last active November 13, 2017 09:44
Setup ibebiz from Powershell (Admin 3+): . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force && Install-BoxstarterPackage https://gist.githubusercontent.com/nobitagamer/30937623b763a0be896ea3273960a66a/raw/ -DisableReboots
# Run in Powershell (Admin 3+):
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force && Install-BoxstarterPackage https://gist.githubusercontent.com/nobitagamer/30937623b763a0be896ea3273960a66a/raw/ -DisableReboots
Set-ExplorerOptions -showHidenFilesFoldersDrivers -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst WindowsInstaller31 -source webpi
cinst WindowsInstaller45 -source webpi
cinst PowerShell3 -source webpi
cinst PowerShell4 -source webpi
<#
.Synopsis
Scans a host or network for the MS17-010 vulnerability and output results as a
table that you can pipe to other PowerShell functions such as Invoke-Command or
Export-CSV.
.DESCRIPTION
This script will use a custom NMap NSE script to scan a destination host on
port 445 for the MS17-010 vulnerability. If the host is not online or is blocking

Keybase proof

I hereby claim:

  • I am nobitagamer on github.
  • I am trieunk (https://keybase.io/trieunk) on keybase.
  • I have a public key whose fingerprint is 7E66 1363 841E 7E32 886A C31D C031 4AF2 3859 6100

To claim this, I am signing this object:

@nobitagamer
nobitagamer / azurepc
Last active October 26, 2023 09:44
:: Setup default environment for developers
:: - Version: 1.2
:: How to use:
:: - Run from cmd: START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/nobitagamer/a985aeee3409a1a846c7deab5e60d933/raw/
:: - From IE: http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/nobitagamer/a985aeee3409a1a846c7deab5e60d933/raw/
Set-ExplorerOptions -showHidenFilesFoldersDrivers -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst WindowsInstaller31 -source webpi
:: Setup default environment for developers
:: - Version: 1.0
:: How to use:
:: - Run from cmd: START http://boxstarter.org/package/nr/url?https://gist.github.com/nobitagamer/166d0850cdbc1c4e247b06a9ba9743ec/raw/
:: - From IE: http://boxstarter.org/package/nr/url?https://gist.github.com/nobitagamer/166d0850cdbc1c4e247b06a9ba9743ec/raw/
Set-ExplorerOptions -showHidenFilesFoldersDrivers -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst WindowsInstaller31 -source webpi
@nobitagamer
nobitagamer / Client.cs
Created February 17, 2017 17:27 — forked from leandrosilva/Client.cs
Asynchronous Client/Server Socket Example with C# (from MSDN library)
// Asynchronous Client Socket Example
// http://msdn.microsoft.com/en-us/library/bew39x2a.aspx
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Text;
// State object for receiving data from remote device.