Skip to content

Instantly share code, notes, and snippets.

View armicron's full-sized avatar

Sergei Vishnikin armicron

View GitHub Profile
@armicron
armicron / hello_world_into_file.asm
Created October 10, 2016 12:35
NASM x86_64 open file and write 'Hello world'
section .text
global _start ;must be declared for linker (ld)
_start: ;tell linker entry point
mov rdi, filename
mov rsi, 0102o ;O_CREAT, man open
mov rdx, 0666o ;umode_t
mov rax, 2
syscall
@armicron
armicron / create_table.py
Last active October 24, 2019 06:56
boto3 dynamodb, create table
import boto3
"""
very slow
docker run -d -p 8000:8000 deangiberson/aws-dynamodb-local
very fast
docker run -d -p 8000:8000 dwmkerr/dynamodb -inMemory
"""
@armicron
armicron / gist:cf47df570014da6ce6f3
Last active August 29, 2015 14:24
upgrading django
1) (Backward compatible) Django 1.8 get_current_site RequestSite support
https://github.com/pennersr/django-allauth/commit/1a25ea96efcb969945df53be220bb65d75ef50db
2) simplejson compatibility
try:
from django.utils import simplejson
except ImportError:
import json as simplejson
3) try:
from django.contrib.sites.requests import RequestSite
except ImportError: