Skip to content

Instantly share code, notes, and snippets.

💭
ШТО

Alex Antonyuk dev4dev

💭
ШТО
Block or report user

Report or block dev4dev

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
@dev4dev
dev4dev / shit.js
Last active Nov 17, 2018
shit parser
View shit.js
const data = "https://res.cloudinary.com/indysigner/image/fetch/f_auto,q_auto/w_400/https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/1565855a-e53b-408b-b12f-b6f3115a8d84/3-accessible-presentations.jpg 400w,https://res.cloudinary.com/indysigner/image/fetch/f_auto,q_auto/w_800/https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/1565855a-e53b-408b-b12f-b6f3115a8d84/3-accessible-presentations.jpg 800w, https://res.cloudinary.com/indysigner/image/fetch/f_auto,q_auto/w_1200/https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/1565855a-e53b-408b-b12f-b6f3115a8d84/3-accessible-presentations.jpg 1200w, https://res.cloudinary.com/indysigner/image/fetch/f_auto,q_auto/w_1600/https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/1565855a-e53b-408b-b12f-b6f3115a8d84/3-accessible-presentations.jpg 1600w, https://res.cloudinary.com/indysigner/image/fetch/f_auto,q_auto/w_2000/https://cloud.netlifyusercontent.com
View wat.swift
let a = "13"
let b = "13a"
if let a = Int(a), let b = Int(b) {
let result = a + b
print(result) // will print only if b is correct number
} else {
print("fuck you spilberg")
}
@dev4dev
dev4dev / test.js
Created Mar 9, 2012
parse google by nodejs
View test.js
var http = require('http-get'),
HTML5 = require('html5'),
Script = process.binding('evals').Script,
util = require('util'),
jsdom = require('jsdom'),
window = jsdom.jsdom(null, null, {parser: HTML5}).createWindow(),
url = require('url');
var parser = new HTML5.Parser({
document: window.document
View test.swift
// some shared services
protocol NetworkService: class {
func get() -> Any
}
class TestnetworkService: NetworkService {
func get() -> Any {
return "GET IT"
}
}
@dev4dev
dev4dev / .gitignore
Last active Apr 13, 2016
Git Ignore Rules
View .gitignore
Thumbs.db
.Trash
# Exclude the build directory
/build
# Exclude OS X folder attributes
.DS_Store
# Exclude user-specific XCode 3 and 4 files
View instruction.md

Clang Formatter

  1. Install Alcatraz
  2. Install ClangFormat Plugin ClangFormat
  3. Restart Xcode
  4. Download .clang-format.yml to your home directory
  curl -L -o ~/.clang-format https://gist.githubusercontent.com/dev4dev/78d0508304558e969b2a/raw/9bab5aefe2e29f4b7b6a5560642618e1e78b397c/.clang-format.yml
@dev4dev
dev4dev / deploy.rb
Created Feb 4, 2013
Builder auto deploy script
View deploy.rb
#!/usr/bin/env ruby -wKU
# encoding: UTF-8
def fail message
puts "ERROR: " + message
exit(-1)
end
def log message
stars = '*' * (message.length + 6)
View prob.cpp
//
// main.cpp
// prob344
//
// Created by Alex Antonyuk on 2/1/13.
// Copyright (c) 2013 Alex Antonyuk. All rights reserved.
//
#include <iostream>
@dev4dev
dev4dev / gist:4656536
Created Jan 28, 2013
newgit shell command
View gist:4656536
function newgit() {
if [[ ! -d "$1" ]]; then
mkdir $1 && cd $_ && git init && touch README.md && git aa && git ci -m Initial
else
echo 'ERROR: such directory already exists.'
fi
}
@dev4dev
dev4dev / doc.md
Last active Dec 11, 2015
Git Rules
View doc.md

Git Configuration

Global ignore list

Проверить где у вас находится файл с глобальными правилами игнорирования можно коммандой

git config --global core.excludesfile

Если оказалось что у вас его нет, то выполняем следующие комманды:

cd ~
You can’t perform that action at this time.