Skip to content

Instantly share code, notes, and snippets.

Michal Duda vookimedlo

Block or report user

Report or block vookimedlo

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
@vookimedlo
vookimedlo / gist:79dbc79c18e4bc0f094f02aae2540b70
Created Aug 1, 2019 — forked from KosmicTask/gist:9a3181909b1fe67368f8
NSTableView custom drag image with background and drop shadow based on contents of NSTableCellView -draggingImageComponents
View gist:79dbc79c18e4bc0f094f02aae2540b70
#pragma mark -
#pragma mark NSTableViewDataSource
- (void)tableView:(NSTableView *)tableView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forRowIndexes:(NSIndexSet *)rowIndexes
{
// configure the drag image
// we are only dragging one item
NSTableCellView *cellView = [self.columnsTableView viewAtColumn:0 row:rowIndexes.firstIndex makeIfNecessary:NO];
if (cellView) {
@vookimedlo
vookimedlo / CalculatorView.swift
Created Jul 7, 2019 — forked from nahuelDeveloper/CalculatorView.swift
An IBInspectable Calculator Construction Set
View CalculatorView.swift
// CalculatorView.swift
// as seen in http://nshipster.com/ibinspectable-ibdesignable/
//
// (c) 2015 Nate Cook, licensed under the MIT license
import UIKit
/// The alignment for drawing an String inside a bounding rectangle.
enum NCStringAlignment {
case LeftTop
@vookimedlo
vookimedlo / git2dch.sh
Created Apr 20, 2019 — forked from nikicat/git2dch.sh
Shell script to regenerate debian changelog from git log
View git2dch.sh
#!/bin/sh
sudo apt-get install -y moreutils git-buildpackage
>debian/changelog
prevtag=initial
pkgname=`cat debian/control | grep '^Package: ' | sed 's/^Package: //'`
git tag -l v* | sort -V | while read tag; do
(echo "$pkgname (${tag#v}) unstable; urgency=low\n"; git log --pretty=format:' * %s' $prevtag..$tag; git log --pretty='format:%n%n -- %aN <%aE> %aD%n%n' $tag^..$tag) | cat - debian/changelog | sponge debian/changelog
prevtag=$tag
@vookimedlo
vookimedlo / windows_batch.md
Created Apr 1, 2019
Windows Batch Scripts: Useful constructs
View windows_batch.md

Change Current Directory to the Batch File Directory

cd /D "%~dp0"

View shell_shortcuts.md
➜  bindkey
"^@" set-mark-command
"^A" beginning-of-line
"^B" backward-char
"^D" delete-char-or-list
"^E" end-of-line
"^F" forward-char
"^G" send-break
"^H" backward-delete-char
@vookimedlo
vookimedlo / interesting_unicode_chars.md
Created Dec 14, 2018
Interesting Unicode Characters
@vookimedlo
vookimedlo / CURL Services.md
Last active Nov 22, 2018
Interesting CURL services
View CURL Services.md

Weather

curl wttr.in/

curl wttr.in/Praha

External IP Address

curl checkip.amazonaws.com

@vookimedlo
vookimedlo / macos_mute_unmute.md
Last active Oct 27, 2018
MacOS: mute & unmute from command line
View macos_mute_unmute.md

Mute volume

osascript -e "set volume with output muted"

Unmute volume

osascript -e "set volume without output muted"
@vookimedlo
vookimedlo / predictable_network_linux.md
Last active Sep 13, 2018
Predictable network interface device names @ Linux
View predictable_network_linux.md

Predictable network interface device names @ Linux

Predictable network interface device names based on:
 - firmware/bios-provided index numbers for on-board devices
 - firmware-provided pci-express hotplug slot index number
 - physical/geographical location of the hardware
 - the interface's MAC address
View keybase.md

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:

You can’t perform that action at this time.