Skip to content

Instantly share code, notes, and snippets.

View ivan4th's full-sized avatar

Ivan Shvedunov ivan4th

  • Spacemesh
  • Yerevan, Armenia
  • 16:14 (UTC +04:00)
View GitHub Profile
@philipz
philipz / gist:9f41498837baeae23cd6
Last active September 30, 2015 19:01
Docker on Qemu

How to build a Qemu environment to run Docker

Qemu

sudo apt-get install qemu-user-static qemu-system-arm debootstrap
mkdir vexpress
cd vexpress
mkdir qemu-img
dd if=/dev/zero of=./vexpress-4G.img bs=4M count=1024
sudo losetup -f ./vexpress-4G.img
@EntropyWorks
EntropyWorks / aptly-mirror.sh
Last active September 17, 2021 17:46
This is my script for mirroring a bunch of apt repos. This only touches the very basics of what (aptly)[http://www.aptly.info/] can do.
#!/bin/bash
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
# Authored by Yazz D. Atlas <yazz.atlas@hp.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
@Liryna
Liryna / ARMDebianUbuntu.md
Last active May 20, 2024 15:04
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

@benhowdle89
benhowdle89 / gist:9533185
Created March 13, 2014 17:41
Gulp + Watchify + Browserify + Handlebars + LiveReload
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var livereload = require('gulp-livereload');
var hbsfy = require("hbsfy").configure({
extensions: ["html"]
});
gulp.task('watch', function() {
@mvaled
mvaled / custom-realgud.el
Created February 7, 2014 21:01
How to attach a command buffer to current source buffer [draft]
(when (and (require 'dash) (require 'realgud) (require 'grizzl))
(defun xars-grizzl-select-cmdbuf()
"Lets the user select a realgud command buffer, unless there's a single
command buffer, in which case returns the buffer directly."
(interactive)
(let ((cmdbuffers (-select #'realgud-cmdbuf? (buffer-list))))
(if (> (length cmdbuffers) 1)
(let* ((cmdbuffers-names (-map #'buffer-name cmdbuffers))
(cmdbuffers-index (grizzl-make-index cmdbuffers-names)))
(let ((selection (grizzl-completing-read
@Apsu
Apsu / interfaces.py
Created November 11, 2013 16:22
WIP Ansible /etc/network/interfaces module
#!/usr/bin/python
import os
import json
def update(module, state, name, auto, hotplug, iface_type, addr_family, address,
netmask, nameservers, gateway):
try:
fd = open('/etc/network/interfaces')
@grvhi
grvhi / twbs-btn-gradients
Last active October 21, 2022 22:24
A simple CSS overwrite to add old-style gradients to Bootstrap 3 flat buttons. CSS created from http://twitterbootstrap3buttons.w3masters.nl
.btn-primary {
background-color: #08c;
border-color: #08c;
color: #fff;
background-color: #007ab8;
background-image: -moz-linear-gradient(top, #08c, #006699);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#006699));
background-image: -webkit-linear-gradient(top, #08c, #006699);
background-image: -o-linear-gradient(top, #08c, #006699);
background-image: linear-gradient(to bottom, #08c, #006699);
@felixvisee
felixvisee / example.js
Created July 4, 2013 16:00
Jasmine promise-returning spec wrapper function, example with https://github.com/slightlyoff/Promises
describe("Something", function () {
it("should promise", promising(function () {
return Promise.reject("Ouch!");
}));
});
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@vsajip
vsajip / pyvenvex.py
Last active May 18, 2024 23:13
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages.The script needs Python 3.3 or later; invoke it using"python pyvenvex.py -h"fo…
#
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve