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
# 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,
@brianherman
brianherman / jessie-mssql.md
Last active June 15, 2018 19:00
Debian Jessie and mssql-server

Download mssql from the microsoft website.

wget https://packages.microsoft.com/ubuntu/16.04/mssql-server/pool/main/m/mssql-server/mssql-server_14.0.1.246-6_amd64.deb

dpkg -i mssql-server_14.0.1.246-6_amd64.deb 

The next command will install dependancies.

sudo apt-get -f install 
@giwa
giwa / file0.txt
Last active July 25, 2018 13:36
トラフィックモニタリング with Kibana, ElasticSearch and Python ref: http://qiita.com/giwa/items/a24c722d8bc1b9a428cb
$ brew install elasticsearch
$ elasticsearch -v
Version: 1.4.4, Build: c88f77f/2015-02-19T13:05:36Z, JVM: 1.7.0_72
@Integralist
Integralist / Mature Engineers.md
Created July 18, 2018 07:46
[Mature Engineers] #mature #senior #developer #qualities #engineer

The following is copied verbatim from https://www.kitchensoap.com/2012/10/25/on-being-a-senior-engineer/ -- this gist is merely a partial backup of that excellent article.

For my own thoughts on the subject (which I still agree with having now read the above link) see my post called "The Perfect Developer Qualities": https://www.integralist.co.uk/posts/the-perfect-developer-qualities/

Mature engineers seek out constructive criticism of their designs.

Every successful engineer I’ve met, upon finishing up a design or getting ready for a project, will continually ask their peers questions along the lines of:

  • “What could I be missing?”
  • “How will this not work?”
@dufferzafar
dufferzafar / mininetSocketTest.py
Last active November 1, 2018 03:04 — forked from bocon13/mininetSocketTest.py
Difference from the fork: PEP8 + Fix "Could not find a default OpenFlow controller" issue
#!/usr/bin/python
from mininet.node import OVSController
from mininet.topo import SingleSwitchTopo
from mininet.net import Mininet
from mininet.log import lg
from mininet.cli import CLI
@jesstelford
jesstelford / netflix-rpi.md
Last active April 4, 2020 17:52
Netflix on Raspberry Pi (incomplete)

Note: as @clibois mentioned below, due to the DRM Netflix uses, all decoding has to be done in CPU, making it somewhat choppy.

Note 2: Even the RPi 3 suffers from these CPU limitations. There is the potentially risky option of overclocking your RPi 3, but I haven't tried this.

If you manage to get smooth playback, please contact me, or post your solution here

UPDATE: I can no longer get this method to work. I have tried using Chromium v47, and v48, and both result in Netflix error "Oops, something went wrong" / C7053-1807, for which I can find no description online. If you manage to get things up and running, please contact me!

OSMC

@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:
@shubhamsre
shubhamsre / 1_kubernetes_on_macOS.md
Created October 15, 2020 04:36 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
import functools
from channels.handler import AsgiRequest
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.settings import api_settings
authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES]