Skip to content

Instantly share code, notes, and snippets.

rw3iss /
Created Jan 25, 2021
Add .deja-dup-ignore file to all subdirectories matching a pattern
# This will only add it to the first instance/depth of the matching ignoreFolder (ie. it won't add it to the sub-dependencies of any node_modules folder
find $startPath -mindepth 1 -maxdepth 5 -name "$ignoreFolder" -type d -not -regex ".*$ignoreFolder.*$ignoreFolder.*" | while read fname; do
echo "" > "$fname/.deja-dup-ignore"
echo "$fname/.deja-dup-ignore created."
mikepruett3 / shell-setup.ps1
Last active Dec 2, 2022
Packages to install via scoop, winget, choco, and other tools...
View shell-setup.ps1
Script to Initialize my custom powershell setup.
Script uses scoop
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
33eyes /
Last active Dec 2, 2022
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally
  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

*.ipynb filter=strip-notebook-output  
CGArtPython /
Last active Dec 2, 2022
A Blender Python script to convert HEX colors to Blender RGB; Video tutorial:
# give Python access to Blender's functionality
import bpy
# extend Python's math functionality
import math
def hex_color_to_rgba(hex_color):
# remove the leading '#' symbol
hex_color = hex_color[1:]
SK851831 / txt.txt
Created Aug 27, 2016 — forked from wookiecooking/txt.txt
haha google dork searches
View txt.txt
intitle:index.of .bash_history
intitle:index.of .sh_history
intitle:”Index of” index.html.bak
intitle:”Index of” index.php.bak
intitle:”Index of” index.jsp.bak
intitle:”Index of” “.htpasswd” htpasswd.bak
inurl:backup intitle:index.of inurl:admin
“Index of /backup”
intitle:”Index of” index.html~
intitle:”Index of” index.php~
StuPig /
Created Nov 7, 2014
git分支清理脚本 script to clean git remote branches
echo '***********************************';
echo '*';
echo -e '*\t分支清理';
echo '*';
echo '***********************************';
echo '';
# 切到主干分支develop,更新远程分支
ines /
Created Aug 1, 2019
Print colored visual diff in Python
import difflib
import wasabi
def diff_strings(a, b):
output = []
matcher = difflib.SequenceMatcher(None, a, b)
for opcode, a0, a1, b0, b1 in matcher.get_opcodes():
if opcode == "equal":
elif opcode == "insert":
meiqimichelle / USstates_avg_latLong
Created Dec 1, 2013
JSON of US states (full names) and their average lat/long
View USstates_avg_latLong
brizandrew /
Created Jul 28, 2017
How to use node.js build routines and npm packages in Django.

Using Node.js With Django

When writing django apps it's easy to ignore the organization of your front end code. Often, these backend coders will just write a static js and css file, stick it in the static directory, and call it a day.

You can also build them as two completely independent parts. With a complex gulp build routine independent of the django app. But if you don't know gulp, node, or those kinds of systems it can be a daunting process to get started with.

Enter django-compressor-toolkit (the name doesn't quite roll off the tongue).

Setting Up Django-Compressor-Toolkit

Using django-compressor and django-compressor-toolkit you can write Javascript ES6 code with all its fancy import/export logic or style your pages with sass instead of css, and leave your deploy routine largely untouched.

hyuki /
Last active Dec 2, 2022



  • 「質問」は結城浩の文章です。
  • 「回答」はChatGPTの文章です。