Skip to content

Instantly share code, notes, and snippets.

View 0xWDG's full-sized avatar
💻
Hacking my way around

Wesley de Groot 0xWDG

💻
Hacking my way around
View GitHub Profile
@calebd
calebd / README.md
Created June 7, 2012 04:22
Simple UITableView implementation using only HTML and CSS

@swr
swr / gist:2938950
Created June 15, 2012 22:10
Turn off Pixelmator converting files to its native format when opened and its auto save annoyances
turn off auto conversion
defaults write com.pixelmatorteam.pixelmator alwaysUseNativeFormat -bool no
turn off auto save
defaults write com.pixelmatorteam.pixelmator disableAutosave -bool yes
@andphe
andphe / gist:3232343
Created August 2, 2012 01:41
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@ScottSmith95
ScottSmith95 / Share-Sheet.html
Last active October 22, 2021 13:40
A responsive web version of iOS Share Sheets. More info: https://ScottHSmith.com/projects/share-sheets/
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
font: normal 300 1em sans-serif;
}
@siema
siema / build.sh
Last active August 15, 2022 10:26
Build script for Xcode workspace with automatic upload to AppBlade
#!/bin/bash
# based on https://gist.github.com/jonah-williams/949831
# keychain unlock for codesign:
# security unlock-keychain "$HOME/Library/Keychains/login.keychain"
# this script assumes that you have signing and provisioning configured in project's plist
# use -m "message" to set AppBlade build description as attribute
@nyg
nyg / iOSCreatePDF.swift
Last active April 2, 2024 11:09
iOS, Swift: Create a PDF file from an HTML string.
// Thanks to http://www.labs.saachitech.com/2012/10/23/pdf-generation-using-uiprintpagerenderer
// Note: including images in the HTML won't work, see here:
// https://github.com/nyg/HTMLWithImagesToPDF
import UIKit
// 1. Create a print formatter
let html = "<b>Hello <i>World!</i></b>"
let fmt = UIMarkupTextPrintFormatter(markupText: html)
@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active November 17, 2023 06:53
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@kaybutter
kaybutter / gist:e9a451fdfda10c25a2af
Created May 23, 2015 16:06
twilight syntax highlighting for swift in jekyll
.highlight { background: #181818; padding: 16px; overflow: auto; line-height: 1.2; border-radius: 0.2em }
.highlight pre { margin: 0}
.highlight code { color: #F8F8F8; font-family: "Source Code Pro", Menlo, monospace; font-size: 70% }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #5F5A60; font-style: italic } /* Comment */
.highlight .err { border:#B22518; } /* Error */
.highlight .k { color: #CDA869 } /* Keyword */
.highlight .cm { color: #5F5A60; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #5F5A60 } /* Comment.Preproc */
.highlight .c1 { color: #5F5A60; font-style: italic } /* Comment.Single */
@valfer
valfer / sendPush.txt
Last active April 29, 2024 12:29
Sending Push Notification with HTTP2 (and PHP) see entire post at: http://coding.tabasoft.it/ios/sending-push-notification-with-http2-and-php/
<?php
/**
* @param $http2ch the curl connection
* @param $http2_server the Apple server url
* @param $apple_cert the path to the certificate
* @param $app_bundle_id the app bundle id
* @param $message the payload to send (JSON)
* @param $token the token of the device
* @return mixed the status code (see https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH101-SW18)
@owenzhao
owenzhao / progressBar.swift
Created October 17, 2016 18:29
progress bar with file dealing process
// MARK: - progress bar with file dealing process
private var counter:Int = 0
func process() {
// get total
// prepare alert
let screenFrame = NSScreen.main()!.frame
let window = NSWindow(contentRect: NSMakeRect(screenFrame.width / 2 - 140, screenFrame.height * 0.66 + 50, 280, 20),
styleMask: NSBorderlessWindowMask,