Skip to content

Instantly share code, notes, and snippets.

View fgimian's full-sized avatar

Fotis Gimian fgimian

  • Melbourne, Australia
View GitHub Profile
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@harvimt
harvimt / cffi_test.c
Created March 10, 2014 07:52
lib7zip minimal c example.
#include <stdio.h>
#include <windows.h>
#include <wchar.h>
#include <initguid.h>
#include "pstdint.h"
DEFINE_GUID(CLSID_CFormat7z,
0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
DEFINE_GUID(IID_IInArchive,
@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"
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
@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()
{
#!/bin/bash
address=https://ilo.mysite.com:34043
username=Administrator
password=********
session_key=$(
curl -fsS \
--insecure \
"$address/json/login_session" \
@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
#
@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(
// slightly modified to reduce bindgen vomit
/****************************************************************************\
DismApi.H
Copyright (c) Microsoft Corporation.
All rights reserved.
\****************************************************************************/
@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)"