Skip to content

Instantly share code, notes, and snippets.

View danijeljw's full-sized avatar
🏠
Staying at home

Danijel-James Wynyard danijeljw

🏠
Staying at home
View GitHub Profile
@danijeljw
danijeljw / gitlab-api.ps1
Created June 24, 2020 00:37 — forked from nobusugi246/gitlab-api.ps1
GitLab API with PowerShell.
# https://docs.gitlab.com/ee/api/projects.html
# https://docs.gitlab.com/ee/api/issues.html
# https://docs.gitlab.com/ee/api/notes.html
# Project List
$r = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'='xxxxx' } -Uri http://xxxxx/api/v4/projects/
$r | Sort-Object -Property id | Format-Table -Property id, name
# Issues List
$r = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'='xxxxx' } -Uri http://xxxxx/api/v4/projects/<xx>/issues
@danijeljw
danijeljw / windows-docker-cheat-sheat.md
Last active March 18, 2023 21:31 — forked from dwilkie/docker-cheat-sheat.md
Windows Docker Cheat Sheet

Build docker image

PS> cd \path\to\Dockerfile
PS> docker build .

View running processes

@danijeljw
danijeljw / reclaimWindows10.ps1
Last active December 24, 2019 03:13 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Modified by: alirobe <[email protected]> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@danijeljw
danijeljw / SampleFunctionTemplate.ps1
Created July 3, 2019 01:45 — forked from ciphertxt/SampleFunctionTemplate.ps1
PowerShell Advanced function template
function Function-Name {
<#
.Synopsis
The short function description.
.Description
The long function description
.Example
C:\PS>Function-Name -param "Param Value"
This example does something
#!/usr/bin/env bash
# Kick off with sudo request
sudo -v
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Kill sudo when done, no password required:
sudo -k
@danijeljw
danijeljw / cask_upgrade.sh
Last active December 17, 2017 19:08
Upgrade casks installed via Homebrew Cask
#!/usr/bin/env bash
brew update
brew cask update
casks=( $(brew cask list) )
for cask in ${casks[@]}
do
# in the first line there is version
@danijeljw
danijeljw / AlbumRatingReset.scpt
Created December 3, 2015 05:07 — forked from dhiraj/AlbumRatingReset.scpt
This AppleScript may allow you to remove or set the album rating on one or more of your tracks to a value you decide. If you use Smart Playlists based on the track rating field, this may be *the* AppleScript you were looking for. If not, then consider moving on, this is probably not what you were looking for. I've modified the script in this fil…
(*
"Album Rating Reset" for iTunes
written by Doug Adams
[email protected]
v1.0 sept 6 2007
-- initial release
v2.0 mar 6 2013
updated by Dhiraj Gupta (http://www.dhirajgupta.com)