- intro, download, install & setup
- basics, syntax
- control flow
- more types, data structures
- methods & interfaces
- concurrency
- nice to know stuff
- golang gotchas <-- especially if you are coming from python, ruby etc
- workspace
This file contains hidden or 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/bash | |
| # This script uses too much unneeded dependencies (like python for adding some integers). Sorry for that. | |
| # You can clean it for your cases (replace python with bc for example). | |
| # TODO: test rsync version shoud has --info=progress2 option (v3.0.10 or more) | |
| #USER="`whoami`" | |
| CONTOUR_MOUNTPOINT="/run/media/$USER/CONTOUR GPS/DCIM" | |
| CONTOUR_ARCHIVE='/path/to/archive' |
This file contains hidden or 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
| """Download Dash User Docsets and install them in Zeal""" | |
| import configparser | |
| import json | |
| import tarfile | |
| import urllib.request | |
| from pathlib import Path | |
| from sys import platform | |
| import easygui |
This file contains hidden or 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
| # the oh-so-famous fish encryption for weechat. | |
| # Copyright (C) 2010, Mikkel Kroman <mk@maero.dk> | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or 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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
This file contains hidden or 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
| ###################################################################### | |
| # Runtime configuration file for Exim # | |
| ###################################################################### | |
| # This is a default configuration file which will operate correctly in | |
| # uncomplicated installations. Please see the manual for a complete list | |
| # of all the runtime configuration options that can be included in a | |
| # configuration file. There are many more than are mentioned here. The | |
| # manual is in the file doc/spec.txt in the Exim distribution as a plain |
This file contains hidden or 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
| diff -Naur lua-5.2.4.origin/Makefile lua-5.2.4/Makefile | |
| --- lua-5.2.4.origin/Makefile 2015-02-24 09:28:54.000000000 +0800 | |
| +++ lua-5.2.4/Makefile 2017-02-04 10:08:40.000000000 +0800 | |
| @@ -47,12 +47,13 @@ | |
| # Lua version and release. | |
| V= 5.2 | |
| R= $V.4 | |
| +TO_LIB+= liblua.so liblua.so.$(V) liblua.so.$(R) | |
| # Targets start here. |
This file contains hidden or 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
| # Usage | |
| class Payment < ActiveRecord::Base | |
| # Readonly columns | |
| include Immutable.for :customer_id, :amount | |
| end | |
| # Implementation 1: Rails Concern | |
| module Immutable | |
| extend ActiveSupport::Concern |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Spoof screen resolution & color depth | |
| // @namespace https://skyzohlabs.be | |
| // @version 1.0.5 | |
| // @description Spoof the reported window.screen as the most common one so that it can't be used to fingerprint browser. | |
| // @author SkyzohKey | |
| // @include http://* | |
| // @include https://* | |
| // @run-at document-end | |
| // @grant none |