Skip to content

Instantly share code, notes, and snippets.

View m1kc's full-sized avatar

Max Musatov m1kc

View GitHub Profile

Finding Great Developers

https://www.joelonsoftware.com/2006/09/06/finding-great-developers-2/

The great software developers, indeed, the best people in every field, are quite simply never on the market.

The average great software developer will apply for, total, maybe, four jobs in their entire career.

The great college graduates get pulled into an internship by a professor with a connection to industry, then they get early offers from that company and never bother applying for any other jobs. If they leave that company, it’s often to go to a startup with a friend, or to follow a great boss to another company, or because they decided they really want to work on, say, Eclipse, because Eclipse is cool, so they look for an Eclipse job at BEA or IBM and then of course they get it because they’re brilliant.

I have three basic methods for how to go about this:

package db_pg_contact
import (
"infra/not-sure/dbtypes"
"domains/data/contact"
"fmt"
"time"
// log "github.com/Sirupsen/logrus"
)
@m1kc
m1kc / create-micro-service.go
Created November 2, 2016 08:37
If your go-micro options just don't seem to work, try this approach.
import (
"time"
"github.com/micro/go-micro"
_ "github.com/micro/go-micro/broker"
"github.com/micro/go-micro/server"
brokerNats "github.com/micro/go-plugins/broker/nats"
transportNats "github.com/micro/go-plugins/transport/nats"
)

TODO: нужен опыт

TODO: недостатки

TODO: порядок сборки для тупых

Набросок: ВР - самый жёсткий из мидовых agility carry для поздней игры

Function.prototype.arrowise = function(){
// удаляем комментарии, выделяем префикс "function...", аргументы и тело
var parsed = this.toString()
.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/mg, '')
.match(/(function.*?)\((.*?)\)\s*\{([\s\S]*)\}.*/);
var prefix = parsed[1], args = parsed[2], code = parsed[3];
// если аргументы есть, добавляется запятая перед аргументом __cb
if(!/^\s*$/.test(args)) args += ',';
@m1kc
m1kc / request.coffee
Last active August 29, 2015 14:03
Посвящается тем говноедам, которые не любят CoffeeScript.
request = require 'request'
rand = Math.floor(Math.random()*100000000).toString()
request(
method: 'PUT'
uri: 'http://mikeal.iriscouch.com/testjs/' + rand
multipart: [
'content-type': 'application/json'
'body': JSON.stringify(
foo: 'bar'
// не моё
function plural_str(i, str1, str2, str3) {
if (i % 10 === 1 && i % 100 !== 11) return str1;
if (i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 10 || i % 100 >= 20)) return str2;
return str3;
}

Code written by a CS 101 student

public int fibonacci(int x) {
	if (x == 1) {
		return 1;
	} else if (x == 2) {
		return 1;
	} else {
		return fibonacci(x - 1) + fibonacci(x - 2);
travis_retry() {
local result=0
local count=3
while [ $count -gt 0 ]; do
"$@"
result=$?
[[ "$result" == "0" ]] && break
count=$(($count - 1))
echo "Command ($@) failed. Retrying: $((3 - $count))" >&2
sleep 1
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
}