Skip to content

Instantly share code, notes, and snippets.

View mykola-radionov's full-sized avatar

Mykola Radionov mykola-radionov

View GitHub Profile
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active April 7, 2025 16:27
Online Resources For Web Developers (No Downloading)
@jconstance-amplify
jconstance-amplify / Install_selenium.sh
Last active June 20, 2022 23:20
SeleniumConf 2017 Amplify Code Snippets
install_selenium_server_standalone() {
local desired_version=${1:-latest}
# Create our shell user
init_shell_user "selenium" "*"
local selenium_download_site="http://selenium-release.storage.googleapis.com"
local selenium_releases=$(curl --silent --show-error "$selenium_download_site" | grep --only-matching --perl-regexp '[0-9\.-\w]+?/selenium-server-standalone.*?\.jar' | sort --reverse)
if [ "$desired_version" == "latest" ]; then
@RichardBronosky
RichardBronosky / pep8_cheatsheet.py
Created December 27, 2015 06:25
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
# -*- coding: utf-8 -*-
"""Demonstrate high quality docstrings.
Module-level docstrings appear as the first "statement" in a module. Remember,
that while strings are regular Python statements, comments are not, so an
inline comment may precede the module-level docstring.
After importing a module, you can access this special string object through the
``__doc__`` attribute; yes, it's actually available as a runtime attribute,
despite not being given an explicit name! The ``__doc__`` attribute is also
@dynamicguy
dynamicguy / install-opencv-2.4.11-in-ubuntu.sh
Last active April 3, 2024 20:20
install opencv-2.4.11 in ubuntu
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
@tjluoma
tjluoma / osxcombo.sh
Created February 9, 2015 20:51
Download and install the OS X combo updater
#!/bin/zsh
# Purpose: Download and install Mac OS X’s combo updater
#
# From: Tj Luo.ma
# Mail: luomat at gmail dot com
# Web: http://RhymesWithDiploma.com
# Date: 2014-05-15
# This is the only thing you _have_ to change
URL='http://support.apple.com/downloads/DL1786/en_US/OSXUpdCombo10.10.2.dmg'
@jacobsalmela
jacobsalmela / ssh-in-single-user-mode.sh
Created May 13, 2014 17:51
Enables outbound SSH in Single-user Mode on OS X
#!/bin/bash
# https://github.com/jacobsalmela
# Enables outbound SSH in single-user mode on OS X
# Save this file as /var/root/.profile and boot into single-user mode
# Last tested on 10.9.2
#----------VARIABLES---------
# Manually set ethernet device ID
@mrkline
mrkline / c_sharp_for_python.md
Last active September 2, 2024 15:51
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,

@uris77
uris77 / repo_pattern.py
Last active May 8, 2024 14:20
Example of Repository Pattern with SQLAlchemy
# This is a very crud example of using the Repository Pattern with SQLAlchemy. It allows me to completely ignore interactions with
# the database. This is only pulled in whenever I require to persist or retrieve an object from the database. The domain/business
# logic is entirely separated from persistence and I can have true unit tests for those.
# The tests for persistence are then limited to very specific cases of persistence and retrieving instances, and I can do those
# independent of the business logic. They also tend to be less tests since I only need to test them once.
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"