- [Введение в программирование на Go][1]
- [Маленькая книга о Go][3]
- [Эффективный Go][2]
- Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cache | |
import ( | |
"crypto/sha256" | |
"encoding/json" | |
"fmt" | |
"os" | |
"sync" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Where the changelog file will be created | |
outputFile='%system.teamcity.build.tempDir%/releasenotesfile_%teamcity.build.id%.txt' | |
# the url of teamcity server | |
teamcityUrl='%teamcity.serverUrl%' | |
# username to access Teamcity REST API | |
username='%system.teamcity.auth.userId%' | |
# password to access Teamcity REST API | |
password='%system.teamcity.auth.password%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"database/sql/driver" | |
"fmt" | |
"github.com/jmoiron/sqlx" | |
_ "github.com/lib/pq" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# gh-dl-release! It works! | |
# | |
# This script downloads an asset from latest or specific Github release of a | |
# private repo. Feel free to extract more of the variables into command line | |
# parameters. | |
# | |
# PREREQUISITES | |
# |
In this file I document the steps taken to get the onboard wifi chip of the Cubietruck (Cubieboard 3) up and running.
Add the wifi driver to the modules to load on startup.
sudo nano /etc/modules
Now add at the end of the file, if not already in the list:
bcmdhd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP FUNCTION IF EXISTS hex_to_bit_varying(hex_string text); | |
CREATE FUNCTION hex_to_bit_varying(hex_string text) RETURNS bit varying AS $$ | |
DECLARE | |
bytes bytea = decode(hex_string, 'hex'); | |
n int = length(bytes) * 8 - 1; | |
bits bit varying := B''::bit varying; | |
BEGIN | |
-- RAISE NOTICE 'bytes=%, n=%', bytes, n; | |
-- RAISE NOTICE 'bits=%', bits; | |
FOR i IN 0 .. n BY 8 LOOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installation: | |
# cd my_gitproject | |
# wget -O pre-commit.sh http://tinyurl.com/mkovs45 | |
# ln -s ../../pre-commit.sh .git/hooks/pre-commit | |
# chmod +x pre-commit.sh | |
OPTIONS="-A8 -t8 --lineend=linux" | |
RETURN=0 |