Skip to content

Instantly share code, notes, and snippets.

View anapsix's full-sized avatar
😺

Anastas Dancha anapsix

😺
View GitHub Profile
@anapsix
anapsix / mouse_latlon.py
Last active November 4, 2020 12:45
mouse position on screen in python
#!/usr/bin/env python
# I didn't write this
# many examples exist on StackOverflow, etc..
#
# Note: you'll need python-xlib, python-gtk
# sudo apt-get install python-xlib python-gtk2
#
import sys
import os
@anapsix
anapsix / bogons_check.rb
Last active August 29, 2015 14:15
Check an IP Address agains Bogons list by turning it into an integer
#!/usr/bin/env ruby
#
# @author: Anastas Dancha <anapsix@random.io>
# @note: This script checks given IPv4 address against Bogons list
# by turnning IPs into integers, IP Ranges into integer ranges
# and using integer comparison.
# @note: Bogons list is retrieved during runtime from http://www.team-cymru.org
# @note: using binary math is way cooler,
# but integers are easier to understand.
# @note: make sure to have required gems installed

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

@anapsix
anapsix / chat.sh
Last active March 18, 2022 18:24
Chat server with Netcat and Bash, inspired by ITA Software 2011 interview challenge
#!/bin/bash
#
# Implementation of BASH + NCAT chat server
#
# Author: Anastas Dancha <anapsix@random.io>
# Contact: anapsix@random.io
#
#debug="true"
@anapsix
anapsix / gitlabci_config.rb
Last active December 28, 2015 19:18
GitLAB-CI config
#!/usr/bin/env ruby
require 'yaml'
require 'getoptlong'
GITLAB_HOME = File.expand_path('../',__FILE__)
$app_config_file = GITLAB_HOME + '/config/application.yml'
$db_config_file = GITLAB_HOME + '/config/database.yml'
$puma_config_file = GITLAB_HOME + '/config/puma.rb'
@anapsix
anapsix / BUNDLER-adding-sqlite3-support.patch
Created November 18, 2013 19:59
GitLab-CI PATCH:: BUNDLER: adding sqlite3 support
From b8abbcc636dad8271477352315da1e9a575b853c Mon Sep 17 00:00:00 2001
From: Anastas Semenov <anapsix@random.io>
Date: Mon, 18 Nov 2013 19:23:18 +0000
Subject: [PATCH] BUNDLER: adding sqlite3 support
---
Gemfile | 5 +++--
Gemfile.lock | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)