Skip to content

Instantly share code, notes, and snippets.

View geokal's full-sized avatar

Giorgos Kal geokal

  • Fogus Innovetions & Services
  • Athens, Greece
View GitHub Profile
@eculver
eculver / mples of how to implement inheritance with Django models
Created April 18, 2010 05:36
Examples of how to implement inheritance with Django models
"""Examples of how to implement inheritance with Django models.
Idea here is DRY (don't repeat yourself). If models are similar, let them
share functionality to the extent that its ancestrty makes sense.
It's important to note is that because of the "abstract = True", Django knows
not to create tables for those models, and instead only creates tables for
those models that implement those abstract base classes.
It can also be noted that instead of having one gigantic, monolithic models.py
@jrothmanshore
jrothmanshore / ip_lookup.ps1
Created May 10, 2012 21:25
Powershell script for performing reverse lookups of IP Addresses
$stop = $args.Count
$inputIP = ""
$inputFile = ""
$knownIPFile = ""
$showUsage = 0
$verbose = 0
for ($i = 0; $i -lt $stop; $i++)
{
if ($args[$i] -eq "-f") {
if ( ($i + 1) -eq $stop) {
@afeld
afeld / gist:4952991
Last active February 8, 2022 03:13
good APIs for mashups

This list has been superseded by Public APIs. Check there for APIs with Auth: No, HTTPS and CORS Yes.


List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.

@joyrexus
joyrexus / jq_vs_js.md
Last active January 22, 2024 21:15
Comparison of jQuery and vanilla JS for basic DOM manipulation.

jQuery vs native JS

Selecting Elements

var divs = $("div");

var divs = document.querySelectorAll("div");
# Copyright 2012 James McCauley
#
# 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:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@natelandau
natelandau / .bash_profile
Last active May 20, 2024 08:41
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@staltz
staltz / introrx.md
Last active May 20, 2024 14:59
The introduction to Reactive Programming you've been missing
@bugcy013
bugcy013 / pmacct
Last active June 20, 2020 17:53
pmacct installation with ubuntu 14.04
Enable RabbitMQ application repository:
echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list
Add the verification key for the package:
curl http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | sudo apt-key add -
Update the sources with our new addition from above:
apt-get update
And finally, download and install RabbitMQ:
@ashrithr
ashrithr / readme.md
Last active December 7, 2022 01:47
Installing ELK on a single machine

Installing ELK (CentOS)

This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.

I. Install JDK

rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
@Lazza
Lazza / README.md
Last active April 16, 2024 09:36
VPNGate Python script

This script is NOT MAINTAINED

This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.

I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.

🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.

The rest of the README is left for historical purposed.