Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vookimedlo's full-sized avatar

Michal Duda vookimedlo

View GitHub Profile
@vookimedlo
vookimedlo / osx-libmagic-homedir.md
Created July 1, 2017 15:17 — forked from vitorio/osx-libmagic-homedir.md
Compiling libmagic and libmagic python bindings natively on OS X within your home directory

These instructions compile a native OS X version of libmagic and the libmagic python binding, which use the system magic database, that live in your home directory, and which cannot be moved around, but which should always be discoverable by applications.

Assumes OS X with Xcode or Xcode command-line tools, not macports or homebrew

To install Xcode command-line tools in recent versions of OS X, open Terminal, type xcode-select --install and click "Install"

Older versions of OS X may need to manually download disk images of older versions of Xcode and/or the Xcode command-line tools, as various certificates may have expired (e.g. 10.7.4 requires a manual install from the Xcode 4.6.2 command-line tools image)

Download Apple's latest modified file 5.04 (used in 10.7+) from http://opensource.apple.com/tarballs/file/file-47.tar.gz

@vookimedlo
vookimedlo / led.sh
Last active July 5, 2017 16:31 — forked from Cameron-D/led.sh
Set Turris Omnia user LED colours based on WAN usage
#!/bin/bash
# interface speeds in BYTES per second
IFC="eth1"
WAN_DOWN=$((60 * 1024 * 128))
WAN_UP=$((60 * 1024 * 128))
# probably don't need to edit from here on
@vookimedlo
vookimedlo / Jekyll installation @ MacOS.md
Last active July 7, 2017 15:30
Steps to get a working Jekyll @ MacOS

Jekyll installation instruction on MacOS

MacOS is coming with a pre-installed Ruby - version 2.0.0p648 at time of writing. Jekyll requires a newer version of Ruby.

Assuming a Homebrew is installed on the MacOS.

  1. Install a rbenv to manage the Ruby installation.

@vookimedlo
vookimedlo / gmail_to_slack.js
Created July 17, 2017 16:37 — forked from andrewmwilson/gmail_to_slack.js
Google Apps Script: Send Gmail emails to Slack
// You will also need to create a gmail filter to add the 'send-to-slack' label
// to any emails you want sent to slack
function sendEmailsToSlack() {
var label = GmailApp.getUserLabelByName('send-to-slack');
var messages = [];
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
messages = messages.concat(threads[i].getMessages())
@vookimedlo
vookimedlo / curl.md
Created December 3, 2017 19:38 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@vookimedlo
vookimedlo / Unicode Numbers
Last active December 19, 2017 22:11
Various Unicode Latin Number Sets
𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗
𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡
𝟢𝟣𝟤𝟥𝟦𝟧𝟨𝟩𝟪𝟫
𝟬𝟭𝟮𝟯𝟰𝟱𝟲𝟳𝟴𝟵
𝟶𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿
0123456789
0123456789
⁰¹²³⁴⁵⁶⁷⁸⁹
@vookimedlo
vookimedlo / MacOS: Tag files from command line.md
Last active January 9, 2018 18:34
MacOS: Tag files from command line
@vookimedlo
vookimedlo / xcode-build-bump.sh
Created March 10, 2018 20:44 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)

Keybase proof

I hereby claim:

  • I am vookimedlo on github.
  • I am vookimedlo (https://keybase.io/vookimedlo) on keybase.
  • I have a public key ASBgHxNE138PO2O8UEAkuzU5h-FUeJYkZVtdGOlFdOvylwo

To claim this, I am signing this object:

@vookimedlo
vookimedlo / CURL Services.md
Last active November 22, 2018 19:03
Interesting CURL services

Weather

curl wttr.in/

curl wttr.in/Praha

External IP Address

curl checkip.amazonaws.com