This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = [1, 2, 3, 4]; | |
list.forEach(function(entry) { | |
console.log(entry); | |
var index = list.indexOf(entry); | |
list.splice(index, 1); | |
}); | |
console.log('list after loop: ', list); | |
/** | |
Console output: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
#!/usr/bin/env python3 | |
# Copyright (c) 2016 Lukas Kollmer <[email protected]> | |
''' | |
Purpose: Showcases a crash when calling a nonexistent python method from within an Objective-C method | |
''' | |
import console | |
from objc_util import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UITapGestureRecognizer = ObjCClass('UITapGestureRecognizer') | |
def action(_self, _cmd, sender): | |
tag = ObjCInstance(sender).view().tag() | |
asset = images[tag] | |
asset.get_image() | |
action.encoding = '@0@0:0@0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from objc_util import * | |
UIColor = ObjCClass('UIColor') | |
UIViewController = ObjCClass('UIViewController') | |
@on_main_thread | |
def main(): | |
color = UIColor.colorWithHexString_('#FFC0CB') | |
vc = UIViewController.new() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Note to self: | |
This UITextView class extension gets calles every time iOS wants to add a new gesture recognizer to the textView. | |
It checks for the type of the gesture recognizer (Long Press) and then for the associated action. | |
Only if the action is ``smallDelayRecognizer:``, the gestuere recognizer will stay enabled. | |
All otheer long press gestures will be disabled. | |
Purpose: | |
Allow user interaction with the links in the attributedText, but disallow text selection | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
๐๐ฌ๐๐๐๐๐ ๐๐๐๐๐๐โบ๏ธ๐๐๐๐๐๐๐๐๐๐๐ค๐ค๐๐ค๐๐ถ๐๐๐๐๐ค๐ณ๐๐๐ ๐ก๐๐๐โน๏ธ๐ฃ๐๐ซ๐ฉ๐ค๐ฎ๐ฑ๐จ๐ฐ๐ฏ๐ฆ๐ง๐ข๐ฅ๐ช๐๐ญ๐ต๐ฒ๐ค๐ท๐ค๐ค๐ด๐ค๐ฉ๐๐ฟ๐น๐บ๐๐ป๐ฝ๐ค๐บ๐ธ๐น๐ป๐ผ๐ฝ๐๐ฟ๐พ๐๐๐๐๐๐๐ฟโโ๐โ๐๐ช๐โ๏ธ๐๐๐๐๐๐๐ค๐โ๐ ๐๐ ๐๐๐ผ๐๐๐ค๐ฅ๐ฃ๐ถ๐ฆ๐ง๐จ๐ฉ๐ฑ๐ด๐ต๐ฒ๐ณ๐ฎ๐ท๐๐ต๐ ๐ผ๐ธ๐ฐ๐ถ๐๐๐ฏ๐ซ๐ฌ๐ญ๐๐๐ ๐๐๐๐๐๐๐๐ฉโโค๏ธโ๐ฉ๐จโโค๏ธโ๐จ๐๐ฉโโค๏ธโ๐โ๐ฉ๐จโโค๏ธโ๐โ๐จ๐ช๐จโ๐ฉโ๐ง๐จโ๐ฉโ๐งโ๐ฆ๐จโ๐ฉโ๐ฆโ๐ฆ๐จโ๐ฉโ๐งโ๐ง๐ฉโ๐ฉโ๐ฆ๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐ฆโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ง๐จโ๐จโ๐ฆ๐จโ๐จโ๐ง๐จโ๐จโ๐งโ๐ฆ๐จโ๐จโ๐ฆโ๐ฆ๐จโ๐จโ๐งโ๐ง๐๐๐๐๐๐๐๐๐๐ฃ๐ ๐ก๐ข๐๐๐๐ฉ๐๐โ๐๐๐๐๐ผ๐๐ถ๐๐๐ถ๐ฑ๐ญ๐น๐ฐ๐ป๐ผ๐จ๐ฏ๐ฆ๐ฎ๐ท๐ฝ๐ธ๐๐ต๐๐๐๐๐๐ง๐ฆ๐ค๐ฃ๐ฅ๐บ๐๐ด๐ฆ๐๐๐๐๐๐ท๐ฆ๐ฆ๐๐ข๐ ๐๐ก๐ฌ๐ณ๐๐๐๐ ๐๐๐๐ช๐ซ๐๐๐๐๐๐๐๐๐๐ฆ๐๐๐ฉ๐๐๐ฟ๐พ๐๐ฒ๐ต๐๐ฒ๐ณ๐ด๐ฑ๐ฟโ๐๐๐๐๐๐๐พ๐บ๐ป๐น๐ท๐ผ๐ธ๐๐๐ฐ๐๐๐ธ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐โญ๏ธ๐๐ซโจโโ๏ธ๐คโ ๏ธ๐ฅ๐ฆโ๏ธ๐งโ๐ฉโก๏ธ๐ฅ๐ฅโ๏ธ๐จโโ๏ธ๐ฌ๐จ๐ช๐ซโโ๏ธ๐ง๐ฆ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ ๐๐ถ๐ฝ๐ ๐ฏ๐๐ง๐๐๐ค๐๐๐๐ญ๐๐๐ฎ๐ฏ๐๐ฒ๐ฅ๐ฃ๐ฑ๐๐๐๐๐ข๐ก๐ง๐จ๐ฆ๐ฐ๐๐ฎ๐ฌ๐ญ๐ซ๐ฟ๐ฉ๐ช๐บ๐ป๐ท๐ธ๐น๐พ๐ถ๐ตโ๏ธ๐ผ๐ด๐ฝโฝ๏ธ๐๐โพ๏ธ๐พ๐๐๐ฑโณ๏ธ๐๐๐ธ๐๐๐๐ฟโท๐โธ๐น๐ฃ๐ฃ๐๐๐โน๐๐ด๐ต๐๐ด๐๐ฝ๐ ๐๐๐ต๐ซ๐๐ญ๐จ๐ช๐ค๐ง๐ผ๐น๐ท๐บ๐ธ๐ป๐ฌ๐ฎ๐พ๐ฏ๐ฒ๐ฐ๐ณ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ฒ๐จ๐๐๐๐๐ก๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐ฉโ๏ธ๐ซ๐ฌโต๏ธ๐ฅ๐คโด๐ณ๐๐ฐ๐บโ๏ธ๐งโฝ๏ธ๐๐ฆ๐ฅ๐๐ข๐ก๐ข๐ ๐๐๐ผ๐ญโฒ๏ธ๐โฐ๐๐ป๐๐พ๐โบ๏ธ๐๐ฃ๐ค๐ ๐๐๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐ฐ๐ฏ๐๐ฝ๐ ๐ก๐๐ข๐ฌ๐ฃ๐ค๐ฅ๐ฆ๐จ๐ช๐ซ๐ฉ๐๐โช๏ธ๐๐๐โฉโ๏ธ๐ฑ๐ฒ๐ปโจ๐ฅ๐จ๐ฑ๐ฒ๐น๐๐ฝ๐พ๐ฟ๐๐ผ๐ท๐ธ๐น๐ฅ๐ฝ๐๐โ๏ธ๐๐ ๐บ๐ป๐๐๐โฑโฒโฐ๐ฐโณโ๏ธ๐ก๐๐๐ก๐ฆ๐ฏ๐๐ข๐ธ๐ต๐ด๐ถ๐ท๐ฐ๐ณ๐โ๐ง๐จโ๐ โ๐ฉโโ๐ซ๐ฃ๐ช๐กโ๐ก๐ฌโ โฐโฑ๐บ๐ฎ๐ฟ๐โ๐ญ๐ฌ๐ณ๐๐๐ก๐ท๐๐ฝ๐ฟ๐๐๐๐๐๐๐ช๐๐ผ๐บโฑ๐ฟ๐๐๐๐๐๐๐๐๐๐๐ฎโ๏ธ๐ฉ๐จ๐ง๐๐ฎ๐ช๐ซ๐ฌ๐ญ๐ฆ๐ฏ๐ฅ๐ค๐๐๐๐๐๐๐๐ ๐๐๐๐๐ณ๐๐๐๐๐๐๐๐ฐ๐๐๐๐๐๐๐๐๐๐๐๐โ๏ธ๐๐๐๐๐ฉ๐ณ๐ด๐๐๐๐๐๐โ๏ธ๐โ๏ธ๐๐๐๐โค๏ธ๐๐๐๐๐โฃ๐๐๐๐๐๐๐๐โฎโโช๐โธโก๐ฏ๐โฏโฆ๐โโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธโ๏ธ๐โ๐ณ๐นโขโฃ๐ด๐ณ๐ถ๐๏ธ๐ธ๐บ๐ทโด๏ธ๐๐๐ฎ๐ใ๏ธใ๏ธ๐ด๐ต๐ฒ๐ ฐ๐ ฑ๐๐๐ พ๐โ๏ธ๐๐ซโโญ๏ธ๐ขโจ๏ธ๐ท๐ฏ๐ณ๐ฑ๐๐ตโ๏ธโโโโผ๏ธโ๏ธ๐ฏ๐ ๐๐ฑโใฝ๏ธโ ๏ธ๐ธ๐ฐโป๏ธ๐ฏ๏ธ๐นโ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
// | |
// Generated by class-dump 3.5 (64 bit). | |
// | |
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. | |
// | |
#pragma mark Function Pointers and Blocks | |
typedef void (*CDUnknownFunctionPointerType)(void); // return type and parameters are unknown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import livejson | |
import datetime | |
def save_new_count2(username, count): | |
date = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") | |
with livejson.File("../db2.json", pretty=True) as db: | |
try: | |
db[username][date] = count | |
except: | |
db[username] = {} | |
db[username][date] = count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html;base64,PGh0bWw+CjxoZWFkPgogIDx0aXRsZT5CYWNrdXAgU2VtaW5hcmFyYmVpdDwvdGl0bGU+CiAgPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgiPgogIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MS4wLCBtYXhpbXVtLXNjYWxlPTEuMCwgdXNlci1zY2FsYWJsZT1ubyIgLz4KICA8bWV0YSBuYW1lPSJhcHBsZS1tb2JpbGUtd2ViLWFwcC1jYXBhYmxlIiBjb250ZW50PSJ5ZXMiPgogIDxtZXRhIG5hbWU9ImFwcGxlLW1vYmlsZS13ZWItYXBwLXN0YXR1cy1iYXItc3R5bGUiIGNvbnRlbnQ9ImJsYWNrLXRyYW5zbHVjZW50Ij4KICA8bGluayByZWw9ImFwcGxlLXRvdWNoLWljb24tcHJlY29tcG9zZWQiIGhyZWY9Imh0dHA6L2xvY2FsaG9zdDo1MjkxOS93ZWJjbGlwcy9pbWFnZXMvQmFja3VwJTI1MjBTZW1pbmFyYXJiZWl0L2ljb24ucG5nIj4KICA8bGluayByZWw9ImFwcGxlLXRvdWNoLXN0YXJ0dXAtaW1hZ2UiIG1lZGlhPSIob3JpZW50YXRpb246IGxhbmRzY2FwZSkiIGhyZWY9Imh0dHA6L2xvY2FsaG9zdDo1MjkxOS93ZWJjbGlwcy9pbWFnZXMvQmFja3VwJTI1MjBTZW1pbmFyYXJiZWl0L2xhbmRzY2FwZS1sYXVuY2gucG5nIi8+CjxsaW5rIHJlbD0iYXBwbGUtdG91Y2gtc3RhcnR1cC1pbWFnZSIgbWVkaWE9IihvcmllbnRhdGlvbjogcG9ydHJhaXQpIiBocmVmPSJodHRwOi9sb2NhbG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import contacts | |
import ui | |
from datetime import datetime | |
import operator | |
import console | |
console.clear() | |
if not contacts.is_authorized(): |