Skip to content

Instantly share code, notes, and snippets.

View lgylym's full-sized avatar
🎯
Focusing

lgylym lgylym

🎯
Focusing
View GitHub Profile
@fkorotkov
fkorotkov / gcr_auth_example.sh
Created February 26, 2018 19:57
JSON key file to Google Container Registry's HTTP API
#!/usr/bin/env bash
GCP_PROJECT_ID=...
MY_IMAGE=...
USERNAME=_json_key
PASSWORD=$(cat keyfile.json)
TOKEN=$(echo "$USERNAME:$PASSWORD" | base64)
@ipmb
ipmb / settings.py
Last active June 27, 2024 18:15
Django logging example
import logging.config
import os
from django.utils.log import DEFAULT_LOGGING
# Disable Django's logging setup
LOGGING_CONFIG = None
LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper()
logging.config.dictConfig({
@ahmetb
ahmetb / gcrgc.sh
Last active May 10, 2024 15:17
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# 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
@genomics-geek
genomics-geek / README.md
Last active January 10, 2024 15:27
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?"

This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).

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
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active June 5, 2024 21:05
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@Miserlou
Miserlou / gist:e67e04be073dc72aa1ab
Created March 3, 2016 12:59
AWS Lambda File System Contents
This file has been truncated, but you can view the full file.
/.
/./root
/./selinux
/./bin
/./bin/iptables-xml
/./bin/arch
/./bin/sh
/./bin/touch
/./bin/loadkeys
/./bin/setfont
@sunner
sunner / gist:6112317
Created July 30, 2013 11:54
将中文亚马逊每日和每周Kindle特价书信息发向邮箱
wget -qO- 'http://t.cn/zYJGEIH' | grep 'table border="0" style="border' -A 180 | sed 's/href="\//href="http:\/\/www.amazon.cn\//g' | mail -s "$(echo -e "Kindle今日特价\nContent-Type: text/html")" somebody@somewhere.com
@talkingmoose
talkingmoose / Create Event from Task\cmE.scpt
Created April 1, 2012 18:30
Outlook for Mac AppleScript to create an event from a task
(*
Create Event from Task
Copyright (c) Microsoft Corporation. All rights reserved.
Modified by William Smith.
*)
tell application "Microsoft Outlook"
@breuderink
breuderink / siks2tex.py
Created September 30, 2011 14:16
Converter for SIKS dissertation list to LaTeX
#!/usr/bin/env python
'''
Quick and dirty hack to get the SIKS dissertation list in LaTeX.
'''
import argparse, re, operator, itertools, sys
parser = argparse.ArgumentParser(
description='Convert SIKS dissertation list to LaTeX.')
parser.add_argument('txt')
parser.add_argument('tex')