Skip to content

Instantly share code, notes, and snippets.

View BindingObservedObject.swift
//: A UIKit based Playground for presenting user interface
import SwiftUI
import UIKit
import Combine
import PlaygroundSupport
class Model: ObservableObject {
@Published var on: Bool = false
}
View .tmux.conf
set -g default-terminal "tmux-256color"
#set -g default-terminal "screen-256color-bce"
set -sg escape-time 0
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g mouse on
@yury
yury / .spacemacs
Last active Feb 22, 2019
.spacemacs
View .spacemacs
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>regex #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@yury
yury / Cutive Mono.css
Created Jan 29, 2018
Example of local fonts
View Cutive Mono.css
/*
Use Fonteer app to install profile
with Cutive Mono font from Google Fonts
*/
@font-face {
font-family: 'Cutive Mono';
src: local('Cutive Mono');
font-weight: normal;
font-style: normal;
View pragmatapro.css
This file has been truncated, but you can view the full file.
@font-face {
font-family: 'Pragmata Pro Mono';
font-weight: normal;
font-style: normal;
src: url(data:font/truetype;charset-utf-8;base64,AAEAAAAQAQAABAAAR0RFRtsVnJMAFHB0AAAHSkdTVUK2t9CdABR3wAAAKKpPUy8yNbJBmwAAAYgAAABgY21hcAXm8dwAAGhsAAAdrmN2dCAw7AWWAACIgAAAAFRmcGdtBpWcNwAAhhwAAAFzZ2FzcAAbAAkAFHBkAAAAEGdseWYM1oJ7AACI1AAR7PxoZWFkh8fp5QAAAQwAAAA2aGhlYQ30GQEAAAFEAAAAJGhtdHiGB+vBAAAB6AAAZoRsb2Nh0EgLYAASddAAAGaIbWF4cBvWCLcAAAFoAAAAIG5hbWXTYbisABLcWAAACNVwb3N0HpFz9QAS5TAAAYs0cHJlcAD5CscAAIeQAAAA8AABAAAAANLxW2Khwl8PPPUACQgAAAAAAE4UN9oAAAAA1AGTjP9e/kUHNwhKAAAACQACAAEAAAAAAAEAAAdc/pYAAAQA/178yQc3AAEAAAAAAAAAAAAAAAAAABmhAAEAABmhAKAAIABtAAcAAQAAAAAACgAAAgAHqAADAAEAAwQAAZAABQEIBZoFMwAAASUFmgUzAAADoABmAgAICQIABQkDAAACAATgACr/0gn96wICgB4AAAAAZnNkZgBAAAD/7gX2/pYAAAdcAWogAAH/39cAAARsBfYAAAAgAAcEAABdBAAAAAQAAAAEAAAABAABfQQAANYEAAAKBAAAagQAAGMEAABvBAABqgQAAQUEAACXBAAAPQQAAFYEAAE8BAAAfgQAATwEAABoBAAAaAQAALMEAACLBAAAYQQAAFUEAAB9BAAAmgQAAIgEAABtBAAAagQAATwEAAE8BAAATgQAAFYEAAB1BAAAaAQAAEwEAABtBAAAnwQAAKUEAACoBAAAvQQAANYEAACHBAAAkQQ
View Facebook-iOS-SDK.podspec
Pod::Spec.new do |s|
s.name = 'Facebook-iOS-SDK'
s.version = '3.10.0'
s.platform = :ios
s.license = 'Apache License, Version 2.0'
s.summary = 'The iOS SDK provides Facebook Platform support for iOS apps.'
s.description = 'The Facebook SDK for iOS enables you to access the Facebook Platform APIs including the Graph API, FQL, and Dialogs.'
s.homepage = 'http://developers.facebook.com/docs/reference/iossdk'
s.author = 'Facebook'
s.source = { :git => 'https://github.com/facebook/facebook-ios-sdk.git', :tag => 'sdk-version-3.10.0' }
View benchmark
Your version
ruby benchmarks/encoding.rb
Rehearsal ---------------------------------------------------------
positive encode: 2.730000 0.010000 2.740000 ( 2.725146)
positive can_encode?: 2.470000 0.000000 2.470000 ( 2.472397)
negative encode: 3.440000 0.000000 3.440000 ( 3.446421)
negative can_encode?: 2.580000 0.000000 2.580000 ( 2.578184)
common encode: 1.730000 0.000000 1.730000 ( 1.732213)
common can_encode?: 0.540000 0.000000 0.540000 ( 0.544492)
----------------------------------------------- total: 13.500000sec
View gist:6270212
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/admin">Title</a>
<div class="nav-collapse">
<ul class="nav navbar-nav">
View _app_bootstrap.css.scss
/*!
* Bootstrap v3.0.0
*
* Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/