Skip to content

Instantly share code, notes, and snippets.

@tackelua
tackelua / robotjs.sh
Last active October 30, 2022 18:31
Install robotjs
# Windows
npm install --global --production windows-build-tools
# Linux
sudo apt-get update && sudo apt-get install build-essential
sudo apt-get install libxtst-dev libpng++-dev
npm install -g node-gyp
node-gyp rebuild
@tackelua
tackelua / web-servers.md
Last active October 22, 2022 23:56 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
New-NetFirewallRule -DisplayName "Gith Inbound" -Direction Inbound -LocalPort 3000-9999 -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName "Gith Outbound" -Direction Outbound -LocalPort 3000-9999 -Protocol TCP -Action Allow
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n allowGlobalConfirmation
choco install chocolateygui -fy
choco install googlechrome -fy
choco install git -fy
@tackelua
tackelua / install-choco-script.bat
Created April 19, 2020 17:16 — forked from mikepsinn/install-choco-script.bat
Windows server Choco automated install script
:: Download this and execute as admin
:: Install choco .exe and add choco to PATH
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n allowGlobalConfirmation
:: Just install node stuff manually. Trust me.
:: choco install nodejs-lts --install-directory='C:\nodejs' -fy
:: npm install -g gulp cordova@6.5.0 ionic@2.2.3 bower
@tackelua
tackelua / PropertyHelper.h
Last active August 16, 2019 03:03 — forked from Rolias/PropertyHelper.h
Qt Auto Property Macros
#pragma once
#include <QObject>
//See Gist Comment for description, usage, warnings and license information
#define AUTO_PROPERTY(TYPE, NAME) \
Q_PROPERTY(TYPE NAME READ NAME WRITE NAME NOTIFY NAME##Changed ) \
public: \
TYPE NAME() const { return a_##NAME ; } \
void NAME(const TYPE& value) { \
if (a_##NAME == value) return; \
a_##NAME = value; \
npm-install-all
@tackelua
tackelua / git
Last active October 30, 2022 16:45 — forked from davepoon/gist:4371622
Added the .gitignore, and refresh the file index so the files get ignored properly.
# update gitignore
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
# fetch over write from remote
git fetch origin master
git reset --hard FETCH_HEAD
git clean -df