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 to .zprofile: | |
# i.e. лох ветка -r | |
# i.e. лох статус | |
лох() { | |
case "$1" in | |
"добавь") shift; git add "$@";; | |
"коммит") shift; git commit "$@";; | |
"извлечение") shift; git pull "$@";; | |
"отправка") shift; git push "$@";; |
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 datetime | |
import os | |
import requests | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from xml.etree import ElementTree | |
app = Flask(__name__) | |
app.debug = True | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///saywhat.db' |
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 tkinter import * | |
from tkinter import filedialog as fd | |
from tkinter import ttk | |
import sys | |
class GUI: | |
""" | |
This application opens a single file in Read Only. (but you can still hi-lite) |
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
class Foo: | |
__slots__ = ["spam", "eggs"] | |
def __init__(self) -> None: | |
self.spam = "spam" | |
self.eggs = "eggs" | |
class Bar(Foo): | |
def __init__(self): |
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
// Utils | |
const range = n => [...Array(n).keys()]; | |
const add = ([x0, y0]) => ([x1, y1]) => [x0 + x1, y0 + y1]; | |
const rotate = θ => ([x, y]) => [ | |
Math.round(x * Math.cos(θ) - y * Math.sin(θ)), | |
Math.round(x * Math.sin(θ) + y * Math.cos(θ)) | |
]; | |
const map = f => g => | |
function*() { | |
for (const v of g()) { |
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
#--------------------------------------------------------------------------------------------------------------------------------------- | |
# | |
# Author: Kyle Brumm | |
# Description: File used to hold Bash configuration, aliases, functions, completions, etc... | |
# | |
# Sections: | |
# 1. ENVIRONMENT SETUP | |
# 2. MAKE TERMINAL BETTER | |
# 3. FOLDER MANAGEMENT | |
# 4. MISC ALIAS' |
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
var PeriodicTable = PeriodicTable || {}; | |
PeriodicTable.periods = new Array( | |
["H","","","","","","","","","","","","","","","","","He"], | |
["Li","Be","","","","","","","","","","","B","C","N","O","F","Ne"], | |
["Na","Mg","","","","","","","","","","","Al","Si","P","S","Cl","Ar"], | |
["K","Ca","Sc","Ti","V","Cr","Mn","Fe","Co","Ni","Cu","Zn","Ga","Ge","As","Se","Br","Kr"], | |
["Rb","Sr","Y","Zr","Nb","Mo","Tc","Ru","Rh","Pd","Ag","Cd","In","Sn","Sb","Te","I","Xe"], | |
["Cs","Ba","La","Hf","Ta","W","Re","Os","Ir","Pt","Au","Hg","Tl","Pb","Bi","Po","At","Rn"], | |
["Fr","Ra","Ac","Rf","Db","Sg","Bh","Hs","Mt","Ds","Rg","Cn","Nh","Fl","Mc","Lv","Ts","Og"], |
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
require_once('../../../../wp-load.php'); | |
private function get_store_data(){ | |
$mydb = new wpdb('DB_USER','DB_PASSWORD','DB_NAME','DB_HOST'); | |
$rows = $mydb->get_results("select * from some_wp_table"); | |
$data=wp_json_encode( $rows ); | |
return json_decode( $data, true ); | |
} |
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
convert -quality 90 -resize 150x -background white -flatten -alpha remove some.png some.jpg |
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
config.vm.provision "shell", inline: <<-SHELL | |
apt-get -y -q update | |
apt-get -y -q upgrade | |
apt-get -y -q install software-properties-common htop | |
add-apt-repository ppa:webupd8team/java | |
apt-get -y -q update | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
apt-get -y -q install oracle-java8-installer | |
apt-get -y -q install oracle-java7-installer |
NewerOlder