Skip to content

Instantly share code, notes, and snippets.

View 9seconds's full-sized avatar
💭
I can't actively participate because of family reasons

Sergey Arkhipov 9seconds

💭
I can't actively participate because of family reasons
View GitHub Profile
    $ cd rust-lang-repo/
    $ git ask src/libcore
    * src/libcore
            Brian Anderson <banderson@mozilla.com>
            Patrick Walton <pcwalton@mimiga.net>
            Alex Crichton <alex@alexcrichton.com>
@9seconds
9seconds / backup.sh
Last active October 21, 2017 18:31
backup wrapper for borg backup
#!/bin/bash
set -eu -o pipefail
# -----------------------------------------------------------------------------
export LANG=en_US.UTF-8
export BORG_PASSPHRASE=''
MAIN_USER="johndoe"
MAIN_HOMEDIR="$(getent passwd ${MAIN_USER} | cut -f 6 -d ':')"
>>> import os
>>> os.remove == os.unlink
True
>>> os.remove is os.unlink
False
>>>
@9seconds
9seconds / ah.rb
Last active August 29, 2015 14:08
HomeBrew formula for Ah
require "formula"
class Ah < Formula
homepage "https://github.com/9seconds/ah"
url "https://github.com/9seconds/ah.git", :tag => "0.13.1"
version "0.13.1"
sha1 ""
bottle do
sha1 "7563b28df830baa880731b9448e88b99dcb68420" => :mavericks
@9seconds
9seconds / wtf1
Created December 11, 2013 18:35
Python WTFs
>>> a = (1, [2, 3])
>>> a[1] += [4, 5]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> print a
(1, [2, 3, 4, 5])
>>>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Solving best-before problem
http://www.spotify.com/se/jobs/tech/best-before/
'''
# ############################################################################