Skip to content

Instantly share code, notes, and snippets.

View mdeangelo272's full-sized avatar

Michael DeAngelo mdeangelo272

View GitHub Profile
Jenkinsfile VIM syntax highlighting
echo 'au BufNewFile,BufRead Jenkinsfile setf groovy' >> ~/.vimrc
@gdelpierre
gdelpierre / openssl_pkcs12.py
Created August 1, 2017 13:08
Ansible module that handle openssl PKCS#12 file
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
@mdeangelo272
mdeangelo272 / tmux-cheatsheet.md
Last active May 29, 2017 17:01
tmux cheatsheet

tmux cheatsheet

Legend

  • <C-x> - hold the control key and press x
  • <M-x> - hold the meta key and press x (usually meta is the alt key)
  • <prefix> - initiate the tmux prefix (default it <C-b> some people like <C-a>)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefers C-a, you need to add this to ~/.tmux.conf:

@DavidWittman
DavidWittman / ansible-dynamic-inventory-converter.py
Created April 12, 2016 22:42
Script for converting Ansible dynamic inventory to static files. It's not perfect, but it'll get you 90% of the way there.
#!/usr/bin/env python
# Converts Ansible dynamic inventory sources to static files
# Input is received via stdin from the dynamic inventory file
# ex:
# ec2.py --list | ansible-dynamic-inventory-converter.py
import json
import os
import sys
@t-mart
t-mart / netrw quick reference.md
Last active April 30, 2024 22:30
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@webdestroya
webdestroya / RichardIsAFuckingIdiot.cs
Created January 4, 2012 01:27
RichardIsAFuckingIdiot
//Code sanitized to protect the foolish.
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web.UI;
namespace Mobile.Web.Control
{
/// <summary>
@tim-smart
tim-smart / ctags definitions for Javascript
Created October 2, 2009 00:07
CTags Definitions for Javascript
--langdef=js
--langmap=js:.js
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/,object/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/,array/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/,string/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/,boolean/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/,number/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/,variable/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*[ \t]*([,;]|$)/\5/,variable/