Skip to content

Instantly share code, notes, and snippets.

View andrulik's full-sized avatar
🏠
Working from home

Andrey Moskalenko andrulik

🏠
Working from home
View GitHub Profile
@andrulik
andrulik / SwitchResX Settings.png
Last active December 10, 2021 14:18 — forked from erichrobinson/README.md
SwitchResX Configuration
SwitchResX Settings.png
@andrulik
andrulik / Ubuntu_AP.md
Created October 27, 2021 21:33 — forked from ExtremeGTX/Ubuntu_AP.md
Setup Ubuntu server as Access point

Introduction

This tutorial for setting up Ubuntu Server (RPi 3B) as Wifi access point

Overview:

The main steps can be listed as following:

  1. Install required packages
  2. Setup hostapd
  3. Setup DNSmasq
  4. Configure AP IP Address
@andrulik
andrulik / zsh.md
Created December 11, 2012 14:20 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh

and then you change your shell to zsh

chsh -s `which zsh`

and then restart

"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best
@andrulik
andrulik / backup_db.py
Created March 12, 2012 22:10 — forked from ericflo/backup_db.py
A management command to put on a cron to keep daily backups of a postgres database (with a 1-week window)
import datetime
import subprocess
from django.conf import settings
from django.core.management.base import BaseCommand
from boto.s3.connection import S3Connection
from boto.s3.key import Key
class Command(BaseCommand):
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users
@andrulik
andrulik / get-packages.ps1
Created February 22, 2012 19:10 — forked from vansha/get-packages.ps1
Download all packages for the solution via NuGet
$scriptDir = split-path $script:MyInvocation.MyCommand.Path
$nuget = "$scriptDir\tools\NuGet.exe"
$packagesDir = "$scriptDir\src\Packages"
$packagesConfigs = get-content "$packagesDir\repositories.config" `
| select-string -pattern "<repository path=" `
| foreach { $_ -replace "\s*<repository path=""", """$packagesDir\" } `
| foreach { $_ -replace "\s*/>" }
foreach ($pathToPackagesConfig in $packagesConfigs)
@andrulik
andrulik / async_psycopg2.py
Created January 23, 2012 22:35 — forked from FSX/async_psycopg2.py
A module for asynchronous PostgreSQL queries in Tornado.
#!/usr/bin/env python
__author__ = 'Frank Smit <frank@61924.nl>'
__version__ = '0.1.0'
import functools
import psycopg2
from tornado.ioloop import IOLoop, PeriodicCallback
"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server: