Skip to content

Instantly share code, notes, and snippets.

View fgimian's full-sized avatar

Fotis Gimian fgimian

View GitHub Profile
@ksylvan
ksylvan / gist:2aacf2b466741a5468b2ea7ab475ee97
Last active October 10, 2017 13:52
Ansible playbook for fixing up a Mac Dock using dockutil
# Based on https://blog.vandenbrand.org/2016/01/04/how-to-automate-your-mac-os-x-setup-with-ansible/
#
- hosts: all
tasks:
- name: Current Dock names
shell: >
dockutil --list |
python -c 'import sys; [sys.stdout.write(line.split("\t")[0] + "\n")
for line in sys.stdin]'
register: dockitems
@ohac
ohac / Caddyfile
Created November 10, 2018 13:16
:443 {
proxy /v1 https://api.native-instruments.com/
proxy /static https://api.native-instruments.com/
log log.txt
}
# sudo setcap cap_net_bind_service=+ep /usr/local/bin/caddy
# /etc/hosts
# 127.0.0.1 api.native-instruments.coz
@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
#
@rickychilcott
rickychilcott / gist:3222c15663dac7d987a1
Created September 9, 2015 19:09
Logic Package Downloads
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/GarageBandBasicContent.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/JamPack1.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/JamPack4_Instruments.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsChillwave.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsDeepHouse.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsDubstep.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsElectroHouse.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsHipHop.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsLegacy1.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsLegacyRemix.pkg
@sgeto
sgeto / InstallNpcap.ps1
Last active July 22, 2020 17:20
A Non-Interactive Npcap Installation Script
# requires -version 4
#
# Copyright (C) 2018 Ali Abdulkadir <autostart.ini@gmail.com> <sgeto@ettercap-project.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sub-license, and/or sell copies of the Software,
@FND
FND / README.md
Last active May 4, 2021 06:54
Falcon WSGI application with asyncio

Getting Started

$ pip install falcon
$ python3 app.py

alternatively with Gunicorn (for HTTP/1.1):

$ pip install gunicorn

$ gunicorn app:app

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
@mfenniak
mfenniak / gist:2978805
Created June 23, 2012 16:01
An extension of Flask that adds file hashes to static file URLs built by url_for("static"...)
import os.path
import contextlib
import hashlib
from flask import Flask
from flask.helpers import safe_join
# Injects an "h" parameter on the URLs of static files that contains a hash of
# the file. This allows the use of aggressive cache settings on static files,
# while ensuring that content changes are reflected immediately due to the
# changed URLs. Hashes are cached in-memory and only checked for updates when
@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"
@mattheath
mattheath / Apple Keyboard Autohotkey Script
Created March 24, 2011 12:37
A script for autohotkey to remap keys when using an Apple Keyboard with a Windows PC
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Matt Heath <matt@mattheath.com>
;
; Script Function:
; Remaps keys when using an Apple Keyboard with a Windows PC
;