$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Create Event from Task | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Modified by William Smith. | |
*) | |
tell application "Microsoft Outlook" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")" [email protected] |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/. | |
/./root | |
/./selinux | |
/./bin | |
/./bin/iptables-xml | |
/./bin/arch | |
/./bin/sh | |
/./bin/touch | |
/./bin/loadkeys | |
/./bin/setfont |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
GCP_PROJECT_ID=... | |
MY_IMAGE=... | |
USERNAME=_json_key | |
PASSWORD=$(cat keyfile.json) | |
TOKEN=$(echo "$USERNAME:$PASSWORD" | base64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Indexing and Searching | |
index = SearchIndex.new | |
index.add(0, "this is an example Document ID:0") | |
index.add(1, "here is another example Document ID:1") | |
index.add(2, "and one more Document ID:2") | |
index.search("example") | |
=> returns Documents 0 and 1 |
OlderNewer