Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* This class can add WSSecurity authentication support to SOAP clients
* implemented with the PHP 5 SOAP extension.
*
* It extends the PHP 5 SOAP client support to add the necessary XML tags to
* the SOAP client requests in order to authenticate on behalf of a given
* user with a given password.
*
<?php
/**
* This class can add WSSecurity authentication support to SOAP clients
* implemented with the PHP 5 SOAP extension.
*
* It extends the PHP 5 SOAP client support to add the necessary XML tags to
* the SOAP client requests in order to authenticate on behalf of a given
* user with a given password.
*
@khramtsoff
khramtsoff / jenkins-ssh-decrypt.py
Created August 18, 2016 09:23
Decrypt jenkins ssh hashes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# original: https://raw.githubusercontent.com/tweksteen/jenkins-decrypt/master/decrypt.py
# detailed explanation: http://thiébaud.fr/jenkins_credentials.html
import re
import sys
import base64
from hashlib import sha256
from binascii import hexlify, unhexlify
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.1\ \(14B72\)/ /Applications/Xcode_7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
import Foundation
extension CustomStringConvertible {
var description: String {
var description: String = "\(type(of: self))("
let selfMirror = Mirror(reflecting: self)
for child in selfMirror.children {
if let propertyName = child.label {
@khramtsoff
khramtsoff / README.md
Last active July 27, 2018 12:24
Setting up developer's macOS

macOS

Системные настройки

  • Тачпад - тап, скорость
  • Клавиатура - автоповтор, задержка
  • Сочетания клавиш - Всеми объектами управления
  • Клавиатура - Русская ПК

All Applications

  • Safari - оптимизирован для работы на mac
@khramtsoff
khramtsoff / XCTestCase+Snapshot.swift
Created November 11, 2020 14:54
XCTestCase+Snapshot.swift
// let sut = UIView()
// let snapshot = sut.snapshot(for: .init(size: sut.frame.size, traitCollection: .init(layoutDirection: .rightToLeft)))
// assert(snapshot: snapshot, named: "my_view")
// record(snapshot: snapshot, named: "my_view")
import UIKit
import XCTest
extension XCTestCase {
func assert(snapshot: UIImage, named name: String, file: StaticString = #filePath, line: UInt = #line) {