Skip to content

Instantly share code, notes, and snippets.

View fgimian's full-sized avatar

Fotis Gimian fgimian

  • Melbourne, Australia
View GitHub Profile
@IngwiePhoenix
IngwiePhoenix / rc.elv
Last active January 4, 2025 06:44
Elvish config
use platform
use runtime
use os
use re
use str
fn -on-windows {|cb|
if $platform:is-windows {
$cb
}
@repi
repi / crate-health.md
Last active July 30, 2024 17:22
Guidelines on evaluating health & quality of third-party crates at Embark

What to evaluate and consider before adding usage of new third-party crates.

These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.

This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.

Legend: 🔒 Must have, ⭐️ Should have, 👍 Nice to have, ℹ️ Info

@ScottHutchinson
ScottHutchinson / install-vsix.ps1
Last active April 12, 2025 09:57
PowerShell scripts for batch installing Visual Studio extensions
# Based on http://nuts4.net/post/automated-download-and-installation-of-visual-studio-extensions-via-powershell
param([String] $PackageName)
$ErrorActionPreference = "Stop"
$baseProtocol = "https:"
$baseHostName = "marketplace.visualstudio.com"
$Uri = "$($baseProtocol)//$($baseHostName)/items?itemName=$($PackageName)"
// slightly modified to reduce bindgen vomit
/****************************************************************************\
DismApi.H
Copyright (c) Microsoft Corporation.
All rights reserved.
\****************************************************************************/
@lennybacon
lennybacon / Setup-TfsBuildAgent.ps1
Last active June 21, 2022 20:24
Totally automated Team Foundation 2017 build agent setup
$tfsUrl = "https://domain.tld/";
$tfsCollection = "DefaultCollection";
$tfsProject = "projectName";
$nugetSourceName = "Libraries";
$nugetFeedUrl = "$tfsUrl/$tfsCollection/_packaging/Libraries/nuget/v3/index.json";
$nugetUserName = "TfsBuild";
$nugetPassword = "*******";
$ErrorActionPreference="Stop";
If(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole(
@abelal83
abelal83 / SevenZipSharp.psm1
Created January 7, 2018 22:10
Some functions for using SevenZipSharp from powershell
Add-Type -Path "$PSScriptRoot\SevenZipSharp.dll"
function Compress-TextToZipStream
{
##############################
#.SYNOPSIS
#Short description
#
#.DESCRIPTION
#Long description
#
#!/bin/bash
address=https://ilo.mysite.com:34043
username=Administrator
password=********
session_key=$(
curl -fsS \
--insecure \
"$address/json/login_session" \
@leonardo-m
leonardo-m / gist:6e9315a57fe9caa893472c2935e9d589
Last active October 13, 2024 14:40
A selection of 101 LINQ Samples converted to Rust
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3.
#![feature(ordering_chaining, step_by)]
fn main() {
// linq5: Where - Indexed
/*
//c#
public void Linq5()
{
using System;
using Newtonsoft.Json;
using System.Reactive.Linq;
using Nito.AsyncEx;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Threading;
using System.Reactive.Threading.Tasks;
namespace Playground
@marc-fez
marc-fez / Get-KeepassPW
Created October 29, 2014 14:57
KPScript retrieve password in Powershell
function Get-KeepassPW{
$result = $null
$KeePath = "C:\Program Files (x86)\KeePass Password Safe 2\KPScript.exe"
# Path to your database
$KeeDataPath = "C:\Users\MyUser\Documents\KeePass\Database.kdbx"
while(!$result){
$pass = Read-Host 'What is your KeePassword?' -AsSecureString
$KePassword = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($pass))
$KeeCommands = @(
"-c:GetEntryString"