Skip to content

Instantly share code, notes, and snippets.

💭
美しい未来に

Sky.G.Uieen GUIEEN

💭
美しい未来に
Block or report user

Report or block GUIEEN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GUIEEN
GUIEEN / use-view-controller-containment.md
Created Aug 27, 2019
[swift] use-view-controller-containment
View use-view-controller-containment.md

https://www.hackingwithswift.com/example-code/uikit/how-to-use-view-controller-containment How to use view controller containment Swift version: 5.0

Paul Hudson @twostraws May 28th 2019 View controller containment allows you to embed one view controller inside another, which can simplify and organize your code. It takes four steps:

  1. Call addChild() on your parent view controller, passing in your child.
  2. Set the child’s frame to whatever you need, if you’re using frames.
View install_nodejs_and_yarn_homebrew.md

Install NVM, NodeJS, Yarn via Homebrew

Prerequisites

  • Homebrew should be installed (Command line tools for Xcode are included).

Getting start

Part A: Install NVM and NodeJS

  1. Install nvm via Homebrew
@GUIEEN
GUIEEN / layer_order.md
Created Aug 21, 2019
Swift layer order
View layer_order.md

ref: https://stackoverflow.com/a/30203412/5260068

bringSubviewToFront(_:)
sendSubviewToBack(_:)
removeFromSuperview()
insertSubview(_:atIndex:)
insertSubview(_:aboveSubview:)
insertSubview(_:belowSubview:)
exchangeSubviewAtIndex(_:withSubviewAtIndex:)
View multipartFormData.swift
// https://stackoverflow.com/a/31957717/5260068
Alamofire.upload(
.POST,
URLString: fullUrl, // http://httpbin.org/post
multipartFormData: { multipartFormData in
multipartFormData.appendBodyPart(fileURL: imagePathUrl!, name: "photo")
multipartFormData.appendBodyPart(fileURL: videoPathUrl!, name: "video")
multipartFormData.appendBodyPart(data: Constants.AuthKey.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!, name :"authKey")
multipartFormData.appendBodyPart(data: "\(16)".dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!, name :"idUserChallenge")
@GUIEEN
GUIEEN / searchBarViewController.swift
Created May 10, 2019
ViewController implementation of searchbar
View searchBarViewController.swift
//
// ViewController.swift
// SwiftSearch
//
// Created by Shrikar Archak on 2/16/15.
// Copyright (c) 2015 Shrikar Archak. All rights reserved.
//
// Ref: https://shrikar.com/swift-ios-tutorial-uisearchbar-and-uisearchbardelegate/
import UIKit
@GUIEEN
GUIEEN / ObjectDumper.cs
Created Apr 24, 2019 — forked from syaifulnizamyahya/ObjectDumper.cs
ObjectDumper for UWP. Use it to quickly get whats inside an object.
View ObjectDumper.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using WinRTXamlToolkit.Common;
namespace ObjectDumper
{
//http://stackoverflow.com/questions/852181/c-printing-all-properties-of-an-object
@GUIEEN
GUIEEN / compileObjectiveC.md
Last active Apr 8, 2019
How to compile objective c in mac
View compileObjectiveC.md
clang -framework Foundation <objc-file-name>.m 
./a.out

It would be better to use with this function :)

function run_objc {
   if [[ -n "$2" ]];then
       secArg=$2
@GUIEEN
GUIEEN / curl.md
Created Apr 3, 2019 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

You can’t perform that action at this time.