rm -rf package-lock.json
rm -rf node_modules
- open
package.json
- copy
dependencies
anddevDependencies
to temp file - clear those blocks
- format the two blocks
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
#!/bin/sh | |
files=frontend/src/static/js | |
pmd cpd --language ecmascript --minimum-tokens 25 --files "$files" --format csv \ | |
| sed "1s/.*/lines,tokens,occurrences,L1,F1,L2,F2,L3,F3,L4,F4/" \ | |
| sed "s|$(pwd)/$files|.|g" \ | |
> dups.csv |
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
<input type="text" | |
placeholder="from" | |
onfocus="(this.type='date')" | |
onblur="(this.type='text')" | |
ng-model="dateMin" /> |
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 -*- | |
import math | |
from collections import Counter | |
from decimal import * | |
from operator import itemgetter | |
from functools import partial | |
from collections import defaultdict | |
EXCLUSIONS = {'wherein', 'plurality', 'configure', 'thereof', 'comprise', |
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 unicodedata | |
def normalize(s): | |
t = buildTable() | |
# remove non-ASCII | |
b = unicodedata.normalize('NFKD', s) | |
return b.translate(t) | |
# Recommend caching this |
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
# Adapted from https://www.hackerearth.com/practice/notes/beautiful-python-a-simple-ascii-art-generator-from-images/ | |
# Tuned for album covers (i.e. known to be square) | |
# Tuned for display in the console (the fixed aspect ratio) | |
from PIL import Image | |
# Reverse the values to invert the image | |
ASCII_CHARS = [' ', '.', ',', ':', '-', '=', '+', '*', '#', '%', '@'] | |
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
#!/bin/bash | |
# ----------------------------------------------------------------------------- | |
SRC_DIR=./path/to/files | |
# ----------------------------------------------------------------------------- | |
direct-query() { | |
raw="$2" |
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
language: node_js | |
node_js: | |
- 8 | |
install: | |
- npm install | |
script: | |
- npm test |
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
aqualite ride the rhythm | |
art of noise close to the edit | |
astrud gilberto with stan getz the girl from ipanema | |
atari teenage riot kids are united | |
atari teenage riot sick to death | |
atari teenage riot speed | |
atomic babies purple | |
autechre second bad vilbel | |
aux 88 electro/techno | |
bally sagoo dil cheez |
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
#!/bin/sh | |
setup_git() { | |
# Set the user name and email to match the API token holder | |
# This will make sure the git commits will have the correct photo | |
# and the user gets the credit for a checkin | |
git config --global user.email "foo@users.noreply.github.com" | |
git config --global user.name "foo" | |
git config --global push.default matching |