Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Peter IJlst 0xPr0xy

🎯
Focusing
View GitHub Profile
View CerPinsky.swift
//
// CertificatePinner.swift
// BenuApp
//
// Created by Peter IJlst | The Mobile Company on 02/10/2018.
// Copyright © 2018 The Mobile Company. All rights reserved.
//
import WebKit
import Alamofire
@0xPr0xy
0xPr0xy / BoundCode.swift
Created Jul 3, 2018
composition over inheritance with viewcontroller lifecycle awareness
View BoundCode.swift
class UIViewControllerLifecycleBound: UIViewController {
public let lifecycleBindings = LifecycleBound()
init() {
super.init(nibName: nil, bundle: nil)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
View Package.swift
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "VaporBlog",
products: [
.library(name: "App", targets: ["App"]),
.executable(name: "Run", targets: ["Run"])
],
View keybase.md

Keybase proof

I hereby claim:

  • I am 0xpr0xy on github.
  • I am 0xpr0xy (https://keybase.io/0xpr0xy) on keybase.
  • I have a public key ASCxVDxwL81Orq161jRIWV8-fD2hfdSVCjImsxFIcAVVcAo

To claim this, I am signing this object:

View Cursor.php
/**
* Wrapper method for MongoCursor::current().
*
* @see http://php.net/manual/en/iterator.current.php
* @see http://php.net/manual/en/mongocursor.current.php
* @return array|null
*/
public function current()
{
$current = $this->mongoCursor->current();
View assembla-tickets-to-changelog
jQuery('table.tickets tbody tr').each(function(){
// get the ticket number
var numberSelector = '.number .list-column-wrapper p';
var numberElem = jQuery(this).find(numberSelector).first();
var number = jQuery(numberElem).text();
// get the summary
var summarySelector = '.summary .list-column-wrapper';
var summaryElem = jQuery(this).find(summarySelector).first();
var summary = jQuery(summaryElem).text();
// get the assignee
View gist:3bce2338d3c98c5363db
Interface:
interface name + 'Interface' as suffix
Abstract class:
prefix with 'Abstract' + class name
Trait:
trait name + 'Trait' as suffix
View gist:e0507d203e700fe3807d
[
{
"id": "891dfee63bb6",
"name": "Op adem na borstkanker",
"type": "package",
"links": [
{
"rel": "self",
"href": "/api/treatment/891dfee63bb6"
},
View check errors
check_errs()
{
# Function. Parameter 1 is the return code
# Para. 2 is text to display on failure.
if [ "${1}" -ne "0" ]; then
echo "ERROR # ${1} : ${2}"
# as a bonus, make our script exit with the right error code.
exit ${1}
fi
}
You can’t perform that action at this time.