Skip to content

Instantly share code, notes, and snippets.

View gcakir's full-sized avatar
🤔

Göksenin Cakir gcakir

🤔
  • Göttingen, Germany
View GitHub Profile
@joakinen
joakinen / certs.sh
Created March 17, 2014 09:03
Converting certificates
#!/bin/sh
# ____ _____ ____ _____ ___ _____ ___ ____ _ _____ _____ ____
# / ___| ____| _ \_ _|_ _| ___|_ _/ ___| / \|_ _| ____/ ___|
# | | | _| | |_) || | | || |_ | | | / _ \ | | | _| \___ \
# | |___| |___| _ < | | | || _| | | |___ / ___ \| | | |___ ___) |
# \____|_____|_| \_\|_| |___|_| |___\____/_/ \_\_| |_____|____/
# ____ _______ __
# | _ \| ___\ \/ /
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@Zearin
Zearin / python_decorator_guide.md
Last active November 17, 2024 12:06
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@ultim8k
ultim8k / vim-multiline-comment.md
Last active October 18, 2024 09:40
(un) comment multiple lines vim

From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim

For those tasks I use most of the time block selection.

Put your cursor on the first # character, press Ctrl``V (or Ctrl``Q for gVim), and go down until the last commented line and press x, that will delete all the # characters vertically.

For commenting a block of text is almost the same: First, go to the first line you want to comment, press Ctrl``V, and select until the last line. Second, press Shift``I``#``Esc (then give it a second), and it will insert a # character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type : s/^/# in the second step instead.

@lee-pai-long
lee-pai-long / caller_info.py
Last active March 20, 2024 16:42 — forked from techtonik/caller_name.py
Python - inspect - Get full caller info: package, module, (class), function, line.
"""
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@TeknoVenus
TeknoVenus / Useful Programs.md
Last active December 1, 2023 16:03
Useful programs

My useful utilities and favourite programs to make everyday life that bit easier

Most of these are Windows based, but some are cross-platform. They are mainly free tools, but paid ones have been marked accordingly. Freemium tools have a free version but have a full version for a price. Tools are in no particular order

Utilities

@PHPirates
PHPirates / git-bundles.md
Last active March 7, 2023 14:28
How to use git bundles

Let machine M be the Main machine with the repo, and A the Auxiliary machine which wants to help out.

First time setup

  1. Machine M creates bundle with complete repo:
git bundle create repo.bundle HEAD master
  1. M sends repo.bundle to A.
  2. A clones repo from bundle:
@source-nerd
source-nerd / Ubuntu 18.04 Docker File
Created May 25, 2018 05:23
Docker Image for Ubuntu 18.04 and Python 3.6
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y build-essential
# This will install Python, pip, pip3, and pip3.6.
RUN curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.6 && python3.6 -m easy_install pip
RUN apt-get update
RUN apt-get install -y python3.6-venv
@paolocarrasco
paolocarrasco / README.md
Last active November 5, 2024 20:08
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@denisgolius
denisgolius / generate-ssh-key.sh
Created October 4, 2018 06:55 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa