Skip to content

Instantly share code, notes, and snippets.

View NARKOZ's full-sized avatar

Nihad Abbasov NARKOZ

  • Kyiv, Ukraine
View GitHub Profile
@vvakame
vvakame / idobata-api.js
Last active May 16, 2019 14:57
idobataはAPIのドキュメントがないので頑張って調べた https://idobata.io/
var http = require("https");
var qs = require('querystring');
var Pusher = require('pusher-client');
var urlBase = "https://idobata.io";
var token = "xxxxx"; // ここにBOTのtokenいれる
var pusherKey = "44ffe67af1c7035be764";
function request(method, path, params) {
@vimishor
vimishor / 503.html
Last active December 31, 2015 05:59
Custom 503 page while deploy on openshift | License: MIT
<!DOCTYPE html>
<html>
<head>
<title>Deploy in progress. Please try again in few minutes</title>
<style type="text/css" />
body {color: #666; text-align: center; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; sans-serif; margin:0; width: 800px; margin: auto; font-size: 14px; }
h1 { font-size: 56px; line-height: 100px; font-weight: normal; color: #456; }
h2 { font-size: 24px; color: #666; line-height: 1.5em; }
h3 { color: #456; font-size: 20px; font-weight: normal; line-height: 28px; }
hr { margin: 18px 0; border: 0; border-top: 1px solid #EEE; border-bottom: 1px solid white; }
@wookiecooking
wookiecooking / aliases.sh
Created November 30, 2013 00:52
[Shell] Assortment of OSX influenced bash aliases and functions
# Rails Stuff
alias stoprails='kill -9 $(lsof -i :3000 -t)'
alias startrails='rails server -d'
alias restartrails='stopRails && startRails'
#Check PHP For Erroes
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l'
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
@davidbella
davidbella / version_sort.rb
Created October 3, 2013 16:03
Ruby: Version sort (bad, incomplete)
require 'pp'
class Array
def version_sort
version_sorted = []
versions = self.collect do |filename|
filename =~ /^foo-(.*)\.ext$/
versions = $1.split('.')
end
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@dulltz
dulltz / syoboi.rb
Created July 3, 2013 07:21
しょぼいカレンダーからスタッフとキャストをパースして保存する
# coding: utf-8
require 'nokogiri'
require 'open-uri'
module My
class SyoboiParser
attr_accessor :anime_number
def initialize(anime_number)
@anime_number = anime_number
end
@max
max / gist:5708466
Created June 4, 2013 18:54
Flat UI Colors as Sass variables
// I needed flatuicolors.com as Sass variables...
// In your console, run:
$('.color').get().map(function(el) { return "$" + el.classList[1] + ": " + el.getAttribute('data-clipboard-text') + ';' }).join('\r\n');
// Output:
// $turquoise: #1abc9c;
// $emerland: #2ecc71;
// $peter-river: #3498db;
// $amethyst: #9b59b6;
// $wet-asphalt: #34495e;
@upsuper
upsuper / bgmrank.rb
Last active May 14, 2019 03:40
统计 Bangumi 上一个用户的收藏的评分分布情况,已移至 https://github.com/upsuper/bgmrank
#!/usr/bin/env ruby
require 'optparse'
require 'net/http'
CATEGORIES = [:anime, :book, :music, :game, :real]
STATES = [:wish, :collect, :do, :on_hold, :dropped]
progress = true
options = {