Skip to content

Instantly share code, notes, and snippets.

View maciekish's full-sized avatar
💭
Flying airplanes

Maciej Swic maciekish

💭
Flying airplanes
View GitHub Profile
@maciekish
maciekish / bigpicture.ahk
Last active September 24, 2022 14:07
AutoHotkey Scripts
#SingleInstance, Force
#NoTrayIcon
;-----------------------------ABOUT-------------------------------
; This script switches audio devices and launches Big Picture Mode
;-----------------------------HOW TO------------------------------
;- 1) Download NirCmd and run as admin to install to Win dir. -
;- http://nircmd.nirsoft.net/setdefaultsounddevice.html -
;- 2) Change Device names below to match your playback devices. -
;- 3) Change Steam path below to match where Steam is installed. -
;-----------------------------------------------------------------
@maciekish
maciekish / Anet+A6_settings.inst.cfg
Last active September 21, 2024 10:47
Anet A6 profile for Cura 3.5. Start Cura once, create a custom printer called "Anet A6" without changing any of the settings and close Cura. Save and overwrite both files in "AppData\Roaming\cura\3.1\definition_changes" and start Cura again.
[general]
version = 4
name = Anet A6_settings
definition = custom
[metadata]
setting_version = 5
type = definition_changes
[values]
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
tell application "Finder"
try
set appPath to (path to application "Evernote" as text)
on error
display dialog "Couldn't find Evernote. Is it installed?"
end try
try
set libPath to (path to library folder from user domain as text)
set newFolder to make new folder at libPath with properties {name:"PDF Services"}
@maciekish
maciekish / alternative
Last active August 29, 2015 14:08
Aerowinx PSX Layout
[Aerowinx Precision Simulator - Layouts]
[Version 10.0.0]
[Layout 1]
title=Takeoff/Landing
screenX=0
screenY=22
screenW=1920
screenH=1000
dividerUpperX=0.7713542
@maciekish
maciekish / UINavigationBar+CustomHeight.h
Created September 10, 2014 08:48
Custom UINavigationBar height working in iOS 7 and 8. To use, find your navigation bar reference and just setHeight:200 etc.
//
// UINavigationBar+CustomHeight.h
//
// Copyright (c) 2014 Maciej Swic
//
// 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, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@maciekish
maciekish / UIApplication+PhoneCapability.h
Last active March 25, 2016 12:26
UIApplication+PhoneCapability. Detects whether the device can actually place a phone call.
//
// UIApplication+PhoneCapability.h
//
// Copyright (c) 2014 Maciej Swic
// 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, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
//
// NaturalMotion.swift
//
// Created by Maciej Swic on 2014-06-06.
// Released under the MIT license.
//
import UIKit
extension UIView {
@maciekish
maciekish / NSObject+Association.h
Created December 3, 2013 16:49
Ever dreamed of adding "userInfo" to an UIAlertView? Now you can! This category allows you to assign any object to any object from iOS 3.1 and Mac OS 10.6 and up.
//
// NSObject+Association.h
//
// Created by Maciej Swic on 03/12/13.
// Released under the MIT license.
//
#import <Foundation/Foundation.h>
@interface NSObject (Association)
@maciekish
maciekish / NSHTTPCookieStorage+FreezeDry.h
Last active February 25, 2021 22:04
Persists UIWebView cookies to disk. To send the cookies with an initial NSURLRequest you must do the following after loading the cookies: NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:yourURL]; NSDictionary* headers = [NSHTTPCookie requestHeaderFieldsWithCookies:[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]]; [requ…
//
// NSHTTPCookieStorage+FreezeDry.h
//
// Created by Maciej Swic on 19/08/13.
//  
// 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, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is