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
@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 21, 2024 02:07
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}"
@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.
"""
@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
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 26, 2024 00:27
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@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
설명
@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):
@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
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
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
@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