I hereby claim:
- I am wdg on github.
- I am wdg (https://keybase.io/wdg) on keybase.
- I have a public key whose fingerprint is F580 85CE B0FE 97E5 9668 9149 7B4C E636 025D BA39
To claim this, I am signing this object:
let jsContext = mainWebview.mainFrame.javaScriptContext | |
jsContext.evaluateScript("var console = {log: function () {var message = '';for (var i = 0; i < arguments.length; i++) {message += arguments[i] + ' '};console.print(message)},warn: function () {var message = '';for (var i = 0; i < arguments.length; i++) {message += arguments[i] + ' '};console.print(message)},error: function () {var message = '';for (var i = 0; i < arguments.length; i++){message += arguments[i] + ' '};console.print(message)}};") | |
let logFunction: @convention(block) (NSString!) -> Void = { (message:NSString!) in | |
print("JS: \(message)") | |
} | |
jsContext.objectForKeyedSubscript("console").setObject(unsafeBitCast(logFunction, AnyObject.self), forKeyedSubscript:"print") |
// | |
// md5.swift | |
// PHPFramework | |
// | |
// Created by Wesley de Groot on 28-02-16. | |
// Copyright © 2016 WDGWV. All rights reserved. | |
// | |
import Foundation |
// | |
// SwiftGetHumanType.swift | |
// PHPFramework | |
// | |
// Created by Wesley de Groot on 02-03-16. | |
// Copyright © 2016 WDGWV. All rights reserved. | |
// | |
// https://gist.github.com/wdg/5cf0f2187c7d31a931b7 | |
import Foundation |
// | |
// SHA1.swift | |
// Based on: | |
// https://raw.github.com/kvz/phpjs/master/functions/strings/sha1.js | |
import Foundation | |
extension String { | |
func charCodeAt(Char: Int) -> Int { |
// | |
// appendBlur.swift | |
// | |
// Created by Wesley de Groot on 09-07-16. | |
// Copyright © 2016 Wesley de Groot. All rights reserved. | |
// | |
import Foundation | |
enum blur: String { | |
case light = "light" |
function hdrDetails(index, elm, length, type) { | |
// divide the length into its largest unit | |
var units = [ | |
[1024 * 1024 * 1024, 'Go'], | |
[1024 * 1024, 'Mo'], | |
[1024, 'Ko'], | |
[1, 'bytes'] | |
]; | |
for(var i = 0; i < units.length; i++){ |
function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()} | |
//Usage: | |
r(function () { | |
// Code here | |
}) |
I hereby claim:
To claim this, I am signing this object:
import Foundation | |
import UIKit | |
class testVC: UIViewController { | |
/* | |
Using this in your first active UITabBar screen, will allow you to change the screen for e.g. a Quick Action. | |
*/ | |
var freshLaunch = true | |
override func viewWillAppear(_ animated: Bool) { |
Sub PasswordBreaker() | |
'Breaks worksheet password protection. | |
Dim i As Integer, j As Integer, k As Integer | |
Dim l As Integer, m As Integer, n As Integer | |
Dim i1 As Integer, i2 As Integer, i3 As Integer | |
Dim i4 As Integer, i5 As Integer, i6 As Integer | |
On Error Resume Next | |
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 |