Skip to content

Instantly share code, notes, and snippets.

View andela-sjames's full-sized avatar
😎
gentlefella

samuelvarejames andela-sjames

😎
gentlefella
  • Dixa
  • Berlin, Germany
  • 02:52 (UTC +02:00)
View GitHub Profile
@andela-pessien
andela-pessien / nginx_setup.sh
Last active November 7, 2017 09:32
A Bash script that builds nginx from source
#!/bin/bash
# This script builds the popular nginx server (https://nginx.org) on *nix systems with
# thread pool support and the following modules:
#
# ngx_http_ssl_module (https://nginx.org/en/docs/http/ngx_http_ssl_module.html)
# ngx_http_v2_module (https://nginx.org/en/docs/http/ngx_http_v2_module.html)
# ngx_http_mp4_module (https://nginx.org/en/docs/http/ngx_http_mp4_module.html)
# ngx_http_gzip_static_module (https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html)
# ngx_http_gunzip_module (https://nginx.org/en/docs/http/ngx_http_gunzip_module.html)
@mariocj89
mariocj89 / python-logging.md
Last active April 13, 2024 13:15
Understanding logging in Python

Logging trees

Introduction

When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.

@florentbr
florentbr / #selenium-chrome-authentication-extension
Last active December 5, 2023 08:49
Chrome extension to automatically set the credentials.
To build the extension, update the username/password and zip `background.js` and `manifest.json` in a single archive.
@Yogendra0Sharma
Yogendra0Sharma / README.md
Created January 12, 2017 08:43 — forked from genomics-geek/README.md
Setting up a Dockerized web application with Django REST APIs, ReactJS with Redux pattern, and Webpack Hot Reloading! Mouthful.

Guide on how to create and set up a Dockerized web app using Django REST APIs and ReactJS

Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"

I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)

Main features:

  • Django REST APIs
  • ReactJS with Redux Pattern
  • Webpack module bundler manager
@sosedoff
sosedoff / 1_simple.go
Created July 16, 2016 18:45
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@AndrewJHart
AndrewJHart / jwt_authentication.py
Created April 13, 2016 18:47
JWT authentication middleware for django rest framework that populates the request.user object
from django.utils.functional import SimpleLazyObject
from django.contrib.auth.models import AnonymousUser
from rest_framework.request import Request
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
def get_user_jwt(request):
"""
Replacement for django session auth get_user & auth.get_user for
@tjbenton
tjbenton / virtualbox-vagrant-nuclear-option.sh
Created April 6, 2016 17:28
Completely uninstall VirtualBox and Vagrant and reinstall through brew
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup
@davisford
davisford / Vagrantfile
Last active April 16, 2022 00:53
Vagrantfile with postgres
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
echo "-------------------- updating package lists"
apt-get update