Skip to content

Instantly share code, notes, and snippets.

View jplindgren's full-sized avatar
:octocat:

João Paulo Pozo Lindgren jplindgren

:octocat:
View GitHub Profile
@jplindgren
jplindgren / 01-Update-Windows.ps1
Created March 16, 2016 17:40 — forked from ChaseFlorell/01-Update-Windows.ps1
Boxstarter Installation Scripts
# http://boxstarter.org/package/url?
#####################
# BEGIN CONFIGURATION
#####################
#region Initial Windows Config
Install-WindowsUpdate -AcceptEula
Update-ExecutionPolicy Unrestricted
@jplindgren
jplindgren / API.md
Created May 3, 2016 17:47 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@jplindgren
jplindgren / dev_setup.ps1
Created June 2, 2016 05:54 — forked from thitemple/dev_setup.ps1
A PowerShell script for installing a dev machine using Chocolatey.
function Add-Path() {
[Cmdletbinding()]
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder)
# Get the current search path from the environment keys in the registry.
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
# See if a new folder has been supplied.
if (!$AddedFolder) {
Return 'No Folder Supplied. $ENV:PATH Unchanged'
}
# See if the new folder exists on the file system.
@jplindgren
jplindgren / Microsoft.PowerShell_profile.ps1
Created June 2, 2016 05:56 — forked from wpsmith/Microsoft.PowerShell_profile.ps1
PowerShell: Profile to always launch PS as Administrator, set Aliases (ex. Notepad++), Import SharePoint Online, Azure AD, and Azure Services.
# Check if Running as Admin
$IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (-not $IsAdmin)
{
if ($MyInvocation.ScriptName -ne "")
{
try
{
Write-Host "Relanuching Script as Admin"
@jplindgren
jplindgren / myprofile.ps1
Last active October 13, 2016 18:34
My Powershell Profile
# Check if Running as Admin
$IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (-not $IsAdmin) {
if ($MyInvocation.ScriptName -ne "") {
try {
Write-Host "Relanuching Script as Admin"
$arg = "-file `"$($MyInvocation.ScriptName)`""
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList $arg -ErrorAction 'stop'
} catch {
@jplindgren
jplindgren / CreateMyProfile.ps1
Last active October 13, 2016 18:35
Automatically download and create powershell profile
######################################################
# Download custom PowerShell profile file
######################################################
Write-Host "Creating custom $profile for Powershell"
if (!(test-path $profile)) {
New-Item -path $profile -type file -force
}
Add-Content $profile ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/jplindgren/a3aefc76b1667e4fefa6a47f9974974e/raw/a6bceca451f08e765bd49e137656b1a25f4aa7b1/myprofile.ps1'))
Write-Host
@jplindgren
jplindgren / introrx.md
Created October 8, 2016 15:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@jplindgren
jplindgren / index.html
Created October 20, 2016 03:27 — forked from anonymous/index.html
Example of dinamic populated datalist [Example of dinamic populated datalist] // source https://jsbin.com/zenayababi
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Example of dinamic populated datalist]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Example of dinamic populated datalist</title>
</head>
<body>
@jplindgren
jplindgren / 00. tutorial.md
Created March 16, 2017 18:43 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@jplindgren
jplindgren / .gitconfig aliases
Created March 19, 2017 23:51
Good aliases for common git commands. Usually .gitignore is at c:/users/myuser in windows.
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
type = cat-file -t
dump = cat-file -p