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
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
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
const { applyMiddleware, createStore } = Redux; | |
const createSagaMiddleware = ReduxSaga.default; | |
const { put, call } = ReduxSaga.effects; | |
const { takeLatest } = ReduxSaga; | |
const { connect, Provider } = ReactRedux; | |
// GitHub API | |
const gitHubApi = (username) => { | |
return fetch(`https://api.github.com/users/${username}`) | |
.then(response => { |
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
ps aux | grep gunicorn | awk '{print $2}' | xargs kill -9 |
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 sys | |
import random | |
import pygame as pg | |
# Importing prepare initializes the display. | |
import prepare | |
import actors | |
class App(object): |
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
# -*- coding: utf-8 -*- | |
# Many thanks to http://stackoverflow.com/users/400617/davidism | |
# This code under "I don't care" license | |
# Take it, use it, learn from it, make it better. | |
# Start this from cmd or shell or whatever | |
# Go to favourite browser and type localhost:5000/admin | |
import sys | |
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.admin import Admin |