Skip to content

Instantly share code, notes, and snippets.

View make-github-pseudonymous-again's full-sized avatar

Notas Hellout make-github-pseudonymous-again

  • Joined on Sep 24, 2012
View GitHub Profile
@henriquemenezes
henriquemenezes / nerd-tree-mappings.txt
Last active January 13, 2020 05:23
NERD tree Mappings
------------------------------------------------------------------------------
2.3. NERD tree Mappings *NERDTreeMappings*
Default Description~ help-tag~
Key~
o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
@nobuoka
nobuoka / commit-built-files-to-gh-pages-branch.markdown
Last active November 22, 2019 15:38
The way to commit built files in subdirectory to gh-pages branch from an arbitrary branch

Committing a subfolder to the gh-pages branch from the other branch

Sometimes you want to commit a subfolder on an arbitrary branch (rather than gh-pages branch) as the root directory to the gh-pages branch. You will want to do so when, for example, the files to be published on GitHub Pages are generated by a build system.

This document shows the way to commit a build/gh-pages directory to the gh-pages branch by using Git plumbing commands. In the following example, Windows PowerShell is used as a shell environment.

Step 1 : Create a tree object

@coderbyheart
coderbyheart / arch-linux-intel-compute-stick.md
Created January 8, 2016 16:03
Arch Linux on Intel Compute Stick
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
anonymous
anonymous / autorotate.py
Created September 27, 2015 20:54
Lenovo Yoga 15 Auto Rotate
#!/usr/bin/env python
##############################################################################
# TODO:
# * create gnome dock w/ status, pause, and lock-rotation options
# * documentation
##############################################################################
from glob import glob
import logging
import os
import signal
#!/bin/bash
i3-msg -t get_workspaces | jq -r 'map(select(.focused))[0].rect["width","height"]'
i3-msg -t get_workspaces | jq -r 'map(select(.focused))[0].output'
= Arch Linux step-by-step installation =
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html =
== Boot the installation CD ==
== Create partition ==
cfdisk /dev/sda
* Create a partition with code 8300 (Linux)
@asmz
asmz / slack_notifier.sh
Last active March 5, 2021 07:35
slack notifier on shell
#!/bin/bash
#
# slack notifier on shell (specified channel)
# @asmz
#
# Usage
# ./slack_notifier.sh [channel_name]
#
# Configuration
# Required SLACK_API_TOKEN environment variable before open tmux.
@ambroisemaupate
ambroisemaupate / security.conf
Last active April 5, 2024 14:38
Nginx CSP example
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
@flandr
flandr / urllib2_tls.py
Created October 16, 2014 15:22
Forcing TLS in Python's urllib2
# Python 2.6's urllib2 does not allow you to select the TLS dialect,
# and by default uses a SSLv23 compatibility negotiation implementation.
# Besides being vulnerable to POODLE, the OSX implementation doesn't
# work correctly, failing to connect to servers that respond only to
# TLS1.0+. These classes help set up TLS support for urllib2.
class TLS1Connection(httplib.HTTPSConnection):
"""Like HTTPSConnection but more specific"""
def __init__(self, host, **kwargs):
httplib.HTTPSConnection.__init__(self, host, **kwargs)