Skip to content

Instantly share code, notes, and snippets.

View AppleCEO's full-sized avatar
💻

사이먼 AppleCEO

💻
View GitHub Profile
struct Programmer {
private let coffee: Coffee
init(coffee: Coffee) {
self.coffee = coffee
}
func startProgramming() {
self.coffee.drink()
//...
struct Programmer {
private let coffee = Coffee()
func startProgramming() {
self.coffee.drink()
//...
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "SearchTableViewCell", for: indexPath) as! SearchTableViewCell
if indexPath.row == 0 {
cell.backgroundColor = .orange
}
return cell
}
@AppleCEO
AppleCEO / Parse JWT.m
Created October 29, 2020 11:24 — forked from AlexHedley/Parse JWT.m
Parse a JWT - JSON Web Token
//DECODE JSON WEB TOKEN (JWT) IN IOS (OBJECTIVE-C)
//http://popdevelop.com/2013/12/decode-json-web-token-jwt-in-ios-objective-c/
NSString *jwt = @"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmb28iOiJiYXIifQ.bVhBeMrW5g33Vi4FLSLn7aqcmAiupmmw-AY17YxCYLI";
NSArray *segments = [jwt componentsSeparatedByString:@"."];
NSString *base64String = [segments objectAtIndex: 1];
NSLog(@"%@", base64String);
// => "eyJmb28iOiJiYXIifQ"
import React from "react";
import "./styles.css";
export default function App() {
return <Contact />
}
class ContactInfo extends React.Component {
render() {
return (
import React from "react";
import "./styles.css";
export default function App() {
return <Counter />;
}
class Counter extends React.Component {
constructor(props) {
super(props);
class Codelab extends React.Component {
render() {
let text = "Hi I am codelab";
let stylegg = {
backgroundColor: 'aqua'
};
return (
<div style={stylegg}>{text}</div>
);
<?php
/**
* Interpolates context values into the message placeholders.
*/
function interpolate($message, array $context = array())
{
// build a replacement array with braces around the context keys
$replace = array();
foreach ($context as $key => $val) {

PSR

NUM TITLE 번역
1 Basic Coding Standard 블로그
3 Logger Interface 번역 중
<?php
namespace Vendor\Model;
class Foo
{
const VERSION = '1.0';
const DATE_APPROVED = '2012-06-01';
}