Skip to content

Instantly share code, notes, and snippets.

View StanczakDominik's full-sized avatar
🧘‍♂️
Taking a bit of a break

Dominik Stańczak-Marikin StanczakDominik

🧘‍♂️
Taking a bit of a break
View GitHub Profile
@raajitr
raajitr / docstring_to_raw.py
Created October 19, 2017 19:08
Script to convert docstring in python code to raw string for the whole project at once.
"""
Usage: Place this file at the root of your project where this code will recursively change docstring to raw string in every py file.
`python doctstring_to_raw.py`
You can also specify the path.
`python doctstring_to_raw.py <path>`
Note: Path should be Unix style. Haven't tested in Windows so not sure if it'll work or not.
"""
@mcchae
mcchae / b_xmlrpc_server.py
Created December 18, 2014 02:32
Python non-blocking XML-RPC
#!/usr/bin/env python
#coding=utf8
"""
====================================
:mod: 테스트용 blocking XML-RPC 서버
====================================
.. moduleauthor:: 채문창 <mcchae@gmail.com>
.. note:: GNU
설명
@bertvv
bertvv / pandoc.Makefile
Last active November 24, 2022 08:55
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src
@RustingSword
RustingSword / fitPlane.py
Created September 7, 2014 12:33
least square plane fitting of 3d points
import numpy as np
import scipy.optimize
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
def fitPlaneLTSQ(XYZ):
@simonw
simonw / wget.md
Created December 9, 2016 06:38
Recursive wget ignoring robots
$ wget -e robots=off -r -np 'http://example.com/folder/'
  • -e robots=off causes it to ignore robots.txt for that domain
  • -r makes it recursive
  • -np = no parents, so it doesn't follow links up to the parent folder
@kristopherjohnson
kristopherjohnson / Makefile
Last active March 14, 2024 20:42
Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
@mikeboiko
mikeboiko / tmux.conf
Last active March 23, 2024 07:32
Automatically update $DISPLAY for each tmux pane after attaching to session
set-hook -g client-attached 'run-shell /bin/update_display.sh'
@william8th
william8th / .tmux.conf
Last active April 30, 2024 17:03
Tmux open new pane in same directory
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 8, 2024 07:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname