Skip to content

Instantly share code, notes, and snippets.

View giulianolatini's full-sized avatar
🎯
Active Directory and AD Azure

Giuliano Latini giulianolatini

🎯
Active Directory and AD Azure
View GitHub Profile
@jdhitsolutions
jdhitsolutions / 1. PSUGInnSalzach
Last active July 5, 2024 23:14
Presentation material for PSUGInnSalzach 9 Nov 2023
return "This is a demo script file."
#demo.ps1
#about me
https://jdhitsolutions.github.io
#Module layout
psedit c:\scripts\new-project.ps1
. c:\scripts\new-project.ps1
Help New-PSProject
@craig-martin
craig-martin / Renew-AccessToken.ps1
Created August 8, 2019 21:49
Using a Refresh Token in PowerShell
<#
This snippet assumes a valid refresh token. To see how to get one of those, check out:
https://www.thelazyadministrator.com/2019/07/22/connect-and-navigate-the-microsoft-graph-api-with-powershell/#3_Authentication_and_Authorization_Different_Methods_to_Connect
#>
$clientId = "1950a258-227b-4e31-a9cf-717495945fc2" # This is the standard client ID for Windows Azure PowerShell
$redirectUrl = [System.Uri]"urn:ietf:wg:oauth:2.0:oob" # This is the standard Redirect URI for Windows Azure PowerShell
$tenant = "fabrikam.onmicrosoft.com" # TODO - your tenant name goes here
$resource = "https://graph.microsoft.com/";
$serviceRootURL = "https://graph.microsoft.com//$tenant"
@TylerLeonhardt
TylerLeonhardt / Init.vim
Created May 24, 2018 16:32
NeoVim PowerShell setup
call plug#begin('~/.local/share/nvim/plugged')
" Handles the fzf popups
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" The LSP client
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
@atifaziz
atifaziz / Unprotect-ProtectedData.ps1
Created March 31, 2017 06:25
Decrypting DPAPI-protected Base64 data from PowerShell
Add-Type -AssemblyName System.Security;
[Text.Encoding]::ASCII.GetString([Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String((type -raw (Join-Path $env:USERPROFILE foobar))), $null, 'CurrentUser'))
@alexellis
alexellis / install-docker-master.sh
Last active August 31, 2023 21:52 — forked from BretFisher/copy-paste.txt
install docker engine for swarm3k on Ubuntu 16.04. 2 options for installing
#!/bin/sh
# option 2: paste this into user-data to automate install via boot script
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours
# renames the host to have a suffix of alexellisio
export original=$(cat /etc/hostname)
sudo hostname $original-master-alexellisio
echo $original-master-alexellisio | sudo tee /etc/hostname
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Deploying Elixir and Phoenix applications using Docker and Exrm

Goal

By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.

Assumptions

  1. You already have a working Elixir environment with the Phoenix Framework installed
  2. You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment

Creare macchina virtuale

$ docker-machine create one -d virtualbox

docker-machine ssh one

edit /var/lib/boot2docker/profile (sotto debian /etc/default/docker)

EXTRA_ARGS='
@JasonGhent
JasonGhent / pi_qemu.sh
Last active March 24, 2024 14:36
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
@v-yarotsky
v-yarotsky / .tmux.conf
Created March 22, 2012 11:57
Mac OS X tmux config
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH