Skip to content

Instantly share code, notes, and snippets.

@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# 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 furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@deepak786
deepak786 / InstagramLikeColorTransition.txt
Last active April 27, 2022 14:30
Instagram Like Gradient Color Transition in Android
/******This Gist explains how to create instagram like Gradient color transition in android.******/
1. Create some gradient color drawables inside drawable Folder.
a) color1.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#c44e4e"
android:endColor="#dcb9b9"
android:angle="0"/>
NOTE:
* Select is the center clicky bit of the top touch pad.
* You can also click / click-and-hold the edges of the touch pad
* Home button looks like a TV to the right of Menu
REMOTE PAIRING
Unpair Siri Remote: Menu, Volume-Up (+), hold for a second or two
REDO RESOLUTION (AUTO)
Screen Resolutions: Menu, Volume-Down (-), hold for a second or two and then release
2015-11-08 13:34:12.725 My Game[392:26007] (
"Kohinoor Telugu",
"Heiti SC",
Symbol,
Courier,
"Apple Color Emoji",
"Avenir Next",
"Arial Hebrew",
"Telugu Sangam MN",
"Helvetica Neue",
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 15, 2025 05:09
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@bwhiteley
bwhiteley / Nil.swift
Last active March 2, 2017 08:31
NilLiteralConvertible can lead to surprising behavior
struct Foo : CustomStringConvertible {
let text:String
init(text:String) {
self.text = text
}
var description:String { return self.text }
}
@JustinAngel
JustinAngel / compareJarsApi22AndAndroidM
Last active August 29, 2015 14:22
API delta between API22 and Android M: New APIs
===== Results of comparing two JARs =====
Generated by @ https://github.com/JustinAngel/compareJars
Showing API additions only. Removed APIs aren't shown.
Comparing 3479 classes from C:\Program Files (x86)\Android\sdk\platforms\android-MNC\android.jar
To 3683 classes from C:\Program Files (x86)\Android\sdk\platforms\android-22\android.jar
public static final class android.Manifest$permission extends Object {
@perlmunger
perlmunger / String+Additions.swift
Last active February 22, 2017 01:06
Some helpful string extensions in Swift 2
extension String
{
var length: Int {
get {
return self.characters.count
}
}
func contains(s: String) -> Bool {
return self.rangeOfString(s) != nil ? true : false
@eito
eito / main.swift
Created February 25, 2015 03:56
swift conditional compile
#if DEBUG
println("Debug mode")
#else
println("Release Mode")
#endif
#if false
println("This code will never run")
#endif
@jtwiest
jtwiest / gist:91dc87ecff82af1e3b34
Last active May 12, 2016 10:54
xCode Default Fonts
To install custom font
1. Drag and Drop font into xcode project
2. Make sure you add to target
- To ensure check the font is included in Target -> Build Phases -> Copy Bundle Resources -> FontName.ttf
3. Add font to target plist
- Should be under "Fonts provided by application" (array)
Value is font file name ie. Oswald-Regular.ttf
4. Use below list generator to find specific font name
5. UIFont *myFont = [UIFont fontWithName:@"Oswald-Regular" size: 22.0];