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
<!-- | |
This file should go under ~/Library/Preferences/<intellij_version>/templates | |
This exposes some live templates / shortcuts for react component development, jasmine tests, and a react + enzyme test skeleton. | |
Jasmine templates: https://github.com/gbritting/jasmine-jetbrains-live-templates | |
React templates: https://github.com/minwe/jetbrains-react | |
react + enzyme test: just type `enzymetest` and hit tab to expand | |
--> | |
<templateSet group="jama"> | |
<template name="enzymetest" value="import React from 'react'; import { shallow, mount } from 'enzyme'; import $componentName$ from './$componentName$'; describe('$componentName$', () => { it('$specDesc$', () => { const subject = shallow(<$componentName$ />); expect(subject$END$); }); }); " description="" toReformat="false" toShortenFQNames="true"> | |
<variable name="componentName" expression="" defaultValue="substringBefore(fileName(),".")" alwaysStopAt="false" /> |
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
// ==UserScript== | |
// @name Show Tab Indices | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description render a jquery tooltip with the current index on every keypress for the active element | |
// @author Max Marchuk | |
// @match *://*/* | |
// @grant none | |
// @require http://code.jquery.com/jquery-3.3.1.js | |
// @require https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js |
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/local/bin/python3 | |
from lxml import html | |
import requests | |
try: | |
file = open("./symbols.txt") | |
file_string = file.read().split() | |
except: | |
file_string = 'Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι'.split() |
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
def presses(phrase): | |
mapping = { | |
"*": "*", | |
"#": "#", | |
0: " 0", | |
1: "1", | |
2: "ABC2", | |
3: "DEF3", | |
4: "GHI4", | |
5: "JKL5", |
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
source ~/.bash_aliases | |
source ~/.git-prompt.sh | |
export PS1="\[\e[00;36m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[00;36m\]\h\[\e[0m\]\[\e[00;37m\]:\[\e[0m\]\[\e[00;35m\]\w\[\e[0m\]\[\e[00;37m\]> \[\e[0m\]" | |
#Get the current VCS branch name (git, mercurial, svn) | |
function be_get_branch { | |
local dir="$PWD" | |
local vcs | |
local nick | |
while [[ "$dir" != "/" ]]; do |
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
syntax on " syntax highlighting | |
filetype indent on " activates indenting for files | |
set number " line numbers | |
colorscheme elflord " set the text/background color scheme | |
set autoindent "use the indentation level of previous line for the new line | |
set smartindent "i don't know. make autoindent smarter or something | |
set expandtab "pressing tab produces spaces | |
set tabstop=4 "tab expands to 4 spaces | |
set shiftwidth=4 "when shifting text, shift it over 4 spaces | |
set hlsearch "highlight text when performing a search |