Skip to content

Instantly share code, notes, and snippets.

@veekas
veekas / slack-dark-theme-instructions.md
Last active March 21, 2019 15:49
Dark theme for Mac Slack App

Dark theme for Mac Slack App

These instructions are my personal implementation of the Slack Black Theme repo. In particular, it is an amalgamation of the css styles in this issue: https://github.com/widget-/slack-black-theme/issues/48

Open ssb-interop.js

Its location will be at /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js

Add the contents of slack-dark-theme.js

@damienlaughton
damienlaughton / UIAccessorizedTextField.swift
Created March 28, 2018 15:16
UIAccessorizedTextField is an iOS friendly alternative to the drop down list
//
// UIAccessorizedTextField.swift
// AccessorizedTextField
//
// Created by Damien Laughton on 28/03/2018.
// 2018 Mobilology Limited. No rights reserved.
//
import Foundation
import UIKit
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@hiilppp
hiilppp / DrafTerm.scpt
Last active October 15, 2019 12:13
As a text file is added to a directory to which this AppleScript is associated as Folder Action, the content of the received file is executed as shell script and the generated output sent to an iOS device.
-- Replace "[Pushover_user_key]" on line #42 with your Pushover accout's user
-- key. (You can find it here: <https://pushover.net/dashboard>)
-- You should probably also replace the app token provided on line #41 with one
-- of your own. (They can be generated here: <https://pushover.net/apps/build>)
on URL_encode(a)
set safe_characters to "abcdefghijklmnopqrstuvwxyz0123456789~-_."
set hex to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
set a_encoded to ""
@viticci
viticci / SaveImage.py
Created January 23, 2014 19:41
SaveImage
import clipboard
import urllib
import Image
import photos
import cStringIO
# Given an image URL in the clipboard, save the image to the iOS Camera Roll with Pythonista. Simple script with no error checks or other settings.
URL = clipboard.get()
@sgerin
sgerin / ios_icons
Created August 19, 2013 03:18
Get iOS icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script: http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Gets the 1024px version of an app icon and applies a rounded mask. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# You may find odd result: try searching for both device categories.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
@nikolaplejic
nikolaplejic / gist:3654637
Created September 6, 2012 10:36
How to copy/paste your password in PayPal's change password form
PayPal blocks copy/paste actions in their "change password" form,
citing some irrelevant security issues as the reason. That's a
load of crap, and they know it -- disabling copy/paste makes it a
lot harder to use a decent password generator and a lot easier to
screw up your pwd when retyping, especially if it's a long one
(as it should be!).
So, here's the quick'n'dirty way to use an externally generated
password in your PayPal account:
@CJKinni
CJKinni / archiveTweets.rb
Last active December 5, 2022 17:50
Download your twitter posts into a single markdown file
#!/usr/bin/ruby
=begin
This script turns downloadable tweets from twitter into a markdown
based text file timeline.
To run, change the 'Username' and 'TwitterFilename' below.
I THINK that this is all working. Check the previous gist version
for a more stable script with far fewer features. Let me know in the
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[JBViewController alloc] initWithNibName:@"JBViewController" bundle:nil];
self.window.rootViewController = self.viewController;
// ADD THIS LINE:
[self.window setTransform:CGAffineTransformMakeScale(0.81, 0.81)];
@collindonnell
collindonnell / ALBUpdateBundleVersion.py
Created February 20, 2012 01:47
Automated Xcode build script to update CFBundleVersion, commit and tag with Git.
#!/usr/bin python
from AppKit import NSMutableDictionary
import os
# Get the name of the current configuration.
configuration = os.environ['CONFIGURATION']
# List of valid configurations where this script should run.
configurations_list = ['Beta', 'App Store']