This file contains hidden or 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
################################################################################ | |
################# Arch Linux mirrorlist generated by Reflector ################# | |
################################################################################ | |
# With: reflector -c US -a 16 -f 15 --save /etc/pacman.d/mirrorlist | |
# When: 2015-11-30 21:13:56 UTC | |
# From: https://www.archlinux.org/mirrors/status/json/ | |
# Retrieved: 2015-11-30 21:13:24 UTC | |
# Last Check: 2015-11-30 20:59:33 UTC |
This file contains hidden or 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
## | |
## Arch Linux repository mirrorlist | |
## Generated on 2016-02-27 | |
## | |
## Any commented mirrors are returning a HTTP 404 for multilib.db | |
## and should not be used. | |
## | |
## Worldwide | |
Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch |
This file contains hidden or 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
$ arch-nspawn $CHROOT/root pacman -S gedit | |
resolving dependencies... | |
:: There are 4 providers available for libgl: | |
:: Repository extra | |
1) mesa-libgl 2) nvidia-304xx-libgl 3) nvidia-340xx-libgl 4) nvidia-libgl | |
Enter a number (default=1): | |
looking for conflicting packages... | |
warning: dependency cycle detected: | |
warning: harfbuzz will be installed before its freetype2 dependency |
This file contains hidden or 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
from flask import Flask, render_template_string, jsonify | |
from flask.ext.login import LoginManager, UserMixin, current_user | |
class User(UserMixin): | |
def __init__(self, token, email): | |
self.id = email | |
self.token = token | |
USERS = {'1': User('1', '[email protected]'), | |
'2': User('2', '[email protected]'), |
This file contains hidden or 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
from . import app, db | |
class Drink(db.Model): | |
__tablename__ = 'drink' | |
id = db.Column(db.Integer, primary_key=True) | |
name = db.Column(db.String(64), index=True, unique=True) | |
recipe = db.relationship("DrinkIngredient", backref="drink") | |
def __init__(self, name): |
This file contains hidden or 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
export default { | |
RpcDirection: { | |
UNKNOWN: 0, 0: "UNKNOWN", | |
RESPONSE: 1, 1: "RESPONSE", | |
REQUEST: 2, 2: "REQUEST", | |
}, | |
TeamColor: { | |
NEUTRAL: 0, 0: "NEUTRAL", | |
BLUE: 1, 1: "BLUE", |
This file contains hidden or 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 os | |
from flask import Flask, request | |
from io import BufferedReader | |
import magic | |
app = Flask(__name__) | |
@app.route("/<string:filename>", methods=['PUT']) | |
def upload(filename): | |
head = request.stream.read(1024) |
This file contains hidden or 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
// Add the following imports and methods in their respective places | |
import com.facebook.infer.annotation.Assertions; | |
import com.facebook.react.LifecycleState; | |
public class MainApplication extends Application implements ReactApplication { | |
protected Application getApplication() { return this; } | |
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { | |
@Override |
This file contains hidden or 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
""" | |
html_to_text | |
Parses and converts HTML to plain text with formatting to match the original intention | |
For example, the following HTML would be converted as follows | |
<html> | |
<head> | |
<style> |
This file contains hidden or 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
Copyright (c) 2016 Franklyn Tackitt | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |