Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
anonymous
anonymous / mapgen.js.coffee
Created February 15, 2015 19:32
Core algorithm for procedural city generation article (http://www.tmwhere.com)
# author: tmwhere.com
# --- third party dependencies
PIXI = require('pixi.dev')
_ = require('lodash')
noise = require('perlin').noise
Quadtree = require('quadtree').Quadtree
seedrandom = require('seedrandom')
# ---
@listochkin
listochkin / gitter-dev-ua-faq.md
Last active April 27, 2021 15:59
Gitter Dev-UA FAQ

FAQ по Gitter-чатам группы Dev-UA

Так получилось, что мы открываем сейчас достаточно много чатов в [Gitter.im][1]: часто это совсем новые для нас сообщества (как [PHP-чат][2], например), а часто - это уже существующие чаты, которые мы создали и администрировали в Skype (например, [Frontend-UA][3]). Не зависимо от того, новый ли это чат или "переезжающий", нам раз за разом задают одни и те же вопросы. Здесь мы собрали их и подготовили несколько ответов.

Почему Gitter?

  1. Больше 300 человек в чате (это лимит в Skype)
@mazgi
mazgi / client.md
Last active August 24, 2018 11:03
LDAP on Gentoo
# emerge -pvq sssd openldap sudo openssh
[ebuild   R   ] net-nds/openldap-2.4.38-r2  USE="berkdb crypt gnutls ipv6 minimal sasl ssl syslog tcpd -cxx -debug -experimental -icu -iodbc -kerberos -odbc -overlays -perl -samba (-selinux) -slp -smbkrb5passwd" ABI_X86="(64) -32 (-x32)" 
[ebuild   R   ] net-misc/openssh-6.7_p1  USE="hpn pam pie -X -X509 -bindist -kerberos -ldap -ldns -libedit -sctp (-selinux) -skey -static" 
[ebuild   R   ] sys-auth/sssd-1.12.1  USE="ssh sudo -acl -augeas -autofs -locator -manpages -netlink -nfsv4 -nls -python (-selinux) {-test}" PYTHON_TARGETS="python2_7" 
[ebuild   R   ] app-admin/sudo-1.8.12  USE="ldap nls pam sendmail -offensive (-selinux) -skey" 
# < /etc/sssd/sssd.conf
@Kagami
Kagami / github-proxy-ssh-tunnel-howto.md
Last active March 13, 2024 21:02
Using github through SSH tunnel
# Prerequisites: netcat-openbsd (BSD version of netcat)
$ ssh -fND 127.0.0.1:8081 user@<your-vps>
$ git config --global url."https://github".insteadOf git://github
$ git config --global http.proxy 'socks5://127.0.0.1:8081'
$ echo -e 'Host github.com\nProxyCommand nc -x 127.0.0.1:8081 %h %p' >> ~/.ssh/config

Alternative solutions:

@jdunck
jdunck / circle.yml.fragment
Last active January 19, 2018 16:16
py.test parallel execution for CircleCI
test:
override:
- find . -maxdepth 1 -type d -not -name . > test_dirs:
parallel: true
- python circle_node_to_dirs.py < test_dirs > test_dirs_for_node:
parallel: true
- echo "Testing `cat test_dirs_for_node`":
parallel: true
- py.test `cat test_dirs_for_node`:
parallel: true
@thatarchguy
thatarchguy / vpnwidget.lua
Created October 21, 2014 23:58
Awesomewm vpn widget
-- add this to your rc.lua, or include it as a dependency
-- Don't forget to add this to the layout section:
-- right_layout:add(vpnwidget)
vpnwidget = wibox.widget.textbox()
vpnwidget:set_text(" VPN: N/A ")
@mbbx6spp
mbbx6spp / README.md
Last active January 8, 2025 13:23
Gerrit vs Github for code review and codebase management

Gerrit vs Github: for code review and codebase management

Sure, Github wins on the UI. Hands down. But, despite my initial annoyance with Gerrit when I first started using it almost a year ago, I am now a convert. Fully. Let me tell you why.

Note: This is an opinionated (on purpose) piece. I assume your preferences are like mine on certain ideas, such as:

  • Fast-forward submits to the target branch are better than allowing merge commits to the target branch. The reason I personally prefer this is that, even if a non-conflicting merge to the target branch is possible, the fact that the review/pull request is not up to date with the latest on the target branch means feature branch test suite runs in the CI pipeline reporting on the review/PR may not be accurate. Another minor point is that forced merge commits are annoying as fuck (opinion) and clutter up Git log histories unnecessarily and I prefer clean histories.
  • Atomic/related changes all in one commit is something worth striving for. Having your dev
@probonopd
probonopd / gist:e5447a774899006af57f
Last active January 4, 2025 19:45
Modify stock OpenWrt installation to be a DHCP client and to use USB storage to expand capacity; provide TimeCapsule service
# Installed barrier_breaker rc2 OpenWrt image
# Set computer to 192.168.1.2
telnet 192.168.1.1
passwd
# Set new root password; this enables ssh
# Set up the wired network interface as a DCHP client
cat > /etc/config/network <<\EOF
@sebdah
sebdah / fibonacci.py
Last active July 13, 2021 09:33
Fibonacci generator in Python
def fibonacci():
""" Generator yielding Fibonacci numbers
:returns: int -- Fibonacci number as an integer
"""
x, y = 0, 1
while True:
yield x
x, y = y, x + y
@sebdah
sebdah / quicksort.py
Created August 4, 2014 07:58
Quicksort implementation in Python
""" Quicksort implementation """
def quicksort(arr):
""" Quicksort a list
:type arr: list
:param arr: List to sort
:returns: list -- Sorted list
"""