Skip to content

Instantly share code, notes, and snippets.

@yury
yury / test.js
Created January 31, 2024 16:07 — forked from NaN1235123/test.rs
Function for my uncle
function Unic(array) {
array.filter((item, index, arr) => {
if(item == -1) {
arr.splice(item)
arr.unshift(item)
}
})
return array
}
//: A UIKit based Playground for presenting user interface
import SwiftUI
import UIKit
import Combine
import PlaygroundSupport
class Model: ObservableObject {
@Published var on: Bool = false
}
@yury
yury / .tmux.conf
Created February 13, 2019 13:44
.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 February 22, 2019 13:11
.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'
@yury
yury / index.html
Last active April 11, 2018 10:27
regex #jsbench #jsperf (http://jsbench.github.io/#1f014e2f5c32759570b1ff6bcad0106e) #jsbench #jsperf
<!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 January 29, 2018 08:32
Example of local fonts
/*
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;
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
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' }
@yury
yury / benchmark
Created September 21, 2013 10:38
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
@yury
yury / gist:6270212
Created August 19, 2013 15:09 — forked from tzoro/gist:6260437
<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">