Skip to content

Instantly share code, notes, and snippets.

Mikołaj Niedbała inthuriel

Block or report user

Report or block inthuriel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View com.yubikey.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.yubikey.app</string>
<key>Program</key>
<string>/Users/[user]/.yubico/yubikey-daemon.sh</string>
<key>KeepAlive</key>
<true/>
View ubikey-daemon.sh
#!/bin/bash
LAST_STATE=`system_profiler SPUSBDataType | grep -ci yubikey | cat`
while :
do
CURRENT_STATE=`system_profiler SPUSBDataType | grep -ci yubikey | cat`
if [ $LAST_STATE -eq $CURRENT_STATE ]; then
# do nothing
true
elif [ $LAST_STATE -lt $CURRENT_STATE ]; then
#echo "Key inserted"
View notes_import.py
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# encoding=utf8
import re
import pprint
import json
import requests
import base64
import sys
@inthuriel
inthuriel / freemem.sh
Last active Apr 24, 2018
Bash script to clean system caches in Linux OS
View freemem.sh
#!/bin/sh
###########################################################################
# use freemem [lvl] [limit to run /num//unit/] [limit to 0- total 1- cache] #
# example usage ./freemem 3 3G 0 #
# author Mikolaj 'Metatron' Niedbala #
# licenced GNU/ GPL #
###########################################################################
echo $1 $2 $3
if [ "$1" -gt "3" ]; then
echo "Cache cleaning level out of range"
You can’t perform that action at this time.