Skip to content

Instantly share code, notes, and snippets.

View superhard's full-sized avatar
🎯
Focusing

Artem superhard

🎯
Focusing
View GitHub Profile
@superhard
superhard / ARCHelper.h
Created July 11, 2016 15:00 — forked from nicklockwood/ARCHelper.h
ARC Helper
//
// ARC Helper
//
// Version 2.2
//
// Created by Nick Lockwood on 05/01/2012.
// Copyright 2012 Charcoal Design
//
// Distributed under the permissive zlib license
// Get the latest version from here:
@superhard
superhard / UIScrollView with masonry
Created June 8, 2016 11:13 — forked from 0oneo/UIScrollView with masonry
vertical and Horizontal scrollview using masonry
@interface ViewController ()
@property (strong, nonatomic) UIScrollView* vScrollView;
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
86937 isset
43159 echo
31697 empty
29252 substr
26146 count
24248 is_array
22572 strlen
19365 sprintf
18090 unset
16584 str_replace
@superhard
superhard / colorComponents.swift
Created November 25, 2015 18:25 — forked from ericdke/colorComponents.swift
Swift: color components (css, hex, rgb) from NSColor
extension NSColor {
func components() -> ((alpha: String, red: String, green: String, blue: String, css: String), (alpha: CGFloat, red: CGFloat, green: CGFloat, blue: CGFloat), (alpha: CGFloat, red: CGFloat, green: CGFloat, blue: CGFloat))? {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0
if var color = self.colorUsingColorSpaceName(NSCalibratedRGBColorSpace) {
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
let nsTuple = (alpha: alpha, red: red, green: green, blue: blue)
@superhard
superhard / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#include <iostream>
#include <string.h>
#include <iomanip>
#include <string>
using namespace std;
const int size=80; //длина информационной строки
const int MaxItems=14; //max количество элементов в таблице