Skip to content

Instantly share code, notes, and snippets.

View Dragod's full-sized avatar
🎲
Ma le spegnene?

Fabio Dragod

🎲
Ma le spegnene?
View GitHub Profile
@adamwdraper
adamwdraper / Node.js File Looper
Created December 5, 2012 04:46
Loop through all files in a given directory with node.js
var fs = require('fs');
var walkPath = './';
var walk = function (dir, done) {
fs.readdir(dir, function (error, list) {
if (error) {
return done(error);
}
@shawndumas
shawndumas / .gitconfig
Created August 5, 2013 19:08
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
@kasuken
kasuken / profiles.json
Created June 23, 2019 12:22
Windows Terminal settings and files
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@beamop
beamop / winstall.ps1
Created May 25, 2020 21:01
My winget powershell script to download my apps using winget (Windows Package Manager for Windows 10)
winget install --id=Google.Chrome -e ; winget install --id=Mozilla.Firefox -e ; winget install --id=Discord.Discord -e ; winget install --id=WhatsApp.WhatsApp -e ; winget install --id=OpenJS.Nodejs -e ; winget install --id=Microsoft.WindowsTerminal -e ; winget install --id=Amazon.AWSCLI -e ; winget install --id=CPUID.CPU-Z -e ; winget install --id=Cryptomator.Cryptomator -e ; winget install --id=hiyohiyo.CrystalDiskInfo -e ; winget install --id=Git.Git -e ; winget install --id=plex.plexmediaplayer -e ; winget install --id=Microsoft.PowerToys -e ; winget install --id=SlackTechnologies.Slack -e ; winget install --id=Microsoft.Skype -e ; winget install --id=Valve.Steam -e ; winget install --id=Spotify.Spotify -e ; winget install --id=Microsoft.Teams -e ; winget install --id=Ubisoft.Uplay -e ; winget install --id=Microsoft.VisualStudioCode -e ; winget install --id=RARLab.WinRAR -e ; winget install --id=WiresharkFoundation.Wireshark -e
@crutkas
crutkas / InstallWinGet.ps1
Last active November 20, 2023 04:13
InstallWinGet PowerShell
function InstallWinGet()
{
$hasPackageManager = Get-AppPackage -name "Microsoft.DesktopAppInstaller"
if(!$hasPackageManager)
{
$releases_url = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$releases = Invoke-RestMethod -uri "$($releases_url)"
@ankurk91
ankurk91 / npm-commands.md
Last active October 22, 2023 12:16
Useful npm commands and tricks

npm v3.10 - ◾

⚠️ This gist is outdated, but most of the commands are still relevant. ⚠️

Update npm itself

npm install -g npm
# Downgrade to a specific version
npm install -g npm@6
@justlaputa
justlaputa / jenkins-api.md
Last active September 26, 2023 17:43
Jenkins Json API

jobs

jenkins_url + /api/json?tree=jobs[name,color]

builds

jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]

last build

@thereverand
thereverand / install-psu.sh
Last active May 5, 2023 09:09
Install PowerShell Universal as a service on Linux
# ----
# This script will install PowerShell Universal on Linux as a service
# This has been tested on Ubuntu 20.04 (ARM64) on a Raspberry Pi 4
# ----
# Dependencies:
# wget
# unzip
#
# Make sure they are installed
# ----
@Ondreas
Ondreas / _text-shadow-compass-mixin.scss
Created January 27, 2015 17:24
Text-Shadow @mixin | Compass
// ######################################################################
// ##
// text-shadow() ##
// ================================================================= ##
// URL: http://compass-style.org/reference/compass/css3/text-shadow/ ##
// ##
// USAGE: ##
// ----------------------------------------------------------------- ##
// @include text-shadow(1px 1px 2px #333333); ##
// ##
@harryi3t
harryi3t / postman-oauth2-refresh-token.js
Created September 20, 2018 18:23
This gist shows how using the pre-request script in Postman, a new Oauth-2 token can be obtained using the a refresh token
/**
** Postman as of the date of this writing does not support auto-refreshing of Oauth-2 tokens.
** This is an exmaple on how in one can refresh their Oauth-2 tokens just using the pre-request scripts.
** Pre-requisites: You need to have a refresh token. You can use the Postman app to get one.
**/
// Set all these variables in an environment or at collection level
let tokenUrl = pm.variables.get('tokenUrl'),
clientId = pm.variables.get('clientId'),
clientSecret = pm.variables.get('clientSecret'),