- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
from flask import Flask, request, session, redirect, url_for | |
import urllib | |
import requests | |
app = Flask(__name__) | |
app.secret_key = 'iwonttellyou' | |
redirect_uri = 'http://localhost:5000/callback' | |
client_id = '' # get from https://code.google.com/apis/console | |
client_secret = '' |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
fn main() { | |
let g = vec![1, 5, 6, 9, 8]; | |
let r = 7; | |
let mut i = g.iter().enumerate().peekable(); | |
while let Some((index, lhs_val)) = i.next() { | |
let lookahead = i.peek(); | |
println!("{}, {} with lookahead {:?}", index, lhs_val, lookahead); | |
} |
from django.db.models import Func, F, Value | |
from images.models import Image | |
Image.objects.all().update(original_filename=Func(F('file'), Value('^.*\/(.*)$'), Value('\\1'), function='regexp_replace')) |