Skip to content

Instantly share code, notes, and snippets.

@illucent
illucent / 1-table-of-contents.md
Created November 26, 2015 14:46 — forked from tunnckoCore/1-table-of-contents.md
Markdown (marked.js) Media Extras - Youtube, Vimeo, DailyMotion, Viddler

Table Of Contents

  • this.gist (this gist, haha)
  • [About][2] enhancement
  • [Usage][4]
  • [JsBin Demo][5]
  • [Integrate][3] with [chjj/marked@0.3.2][6]

Most powerful GFM(-ish) markdown compilier/parser, [chjj/marked@0.3.2][6] already with VIDEO MEDIA EXTRAS!

@illucent
illucent / get-latest-vivaldi.sh
Created November 25, 2015 14:13 — forked from ruario/get-vivaldi-snap.sh
Fetches the latest Vivaldi Linux rpm or deb package listed on the team blog
#!/bin/sh
case ${ARCH:-$(uname -m)} in
x86_64) DEBARCH=amd64; ARCH=x86_64 ;;
i?86) DEBARCH=i386; ARCH=i386 ;;
*) echo "Your architecture is not supported!" >&2; exit 1 ;;
esac
if [ "$1" = "-d" ]; then
PKGTYPE=deb
ARCH=$DEBARCH
#!/bin/sh
### BEGIN INIT INFO
# Provides: thin
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: thin initscript
# Description: thin
### END INIT INFO
@illucent
illucent / multisync.sh
Created November 22, 2015 11:21 — forked from L422Y/multisync.sh
lftp script to mirror remote ftp site to local folder using multiple connections per file and parallel file downloads (for reference/cron jobs)
#!/bin/bash
do_multisync() {
remote_dir="private/files"
local_dir="/root/i_drive/files"
# remote host
host="ftp.myremotehost.com"
# username / password
user="larry"
@illucent
illucent / sitecustomize.py
Created November 21, 2015 17:28 — forked from mewm/sitecustomize.py
Fix SSL winrm error win2012 on mac el capitan default python 2.7 - create /Library/Python/2.7/site-packages/sitecustomize.py with the content below
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context
@illucent
illucent / getInfo.py
Created November 21, 2015 17:21 — forked from markberly/getInfo.py
A short script to provide more detail about the devices connected to an ethernet switch, enhancing 'show mac address' to include OUI vendor info (via API call so you must have access to the Internet) and LLDP neighbor information. Built using Arista EOS eAPI.
#!/usr/bin/python
#
# Written by: Mark Berly
#
# Copyright (c) 2014, Arista Networks, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
@illucent
illucent / unicode_names.py
Created November 21, 2015 01:05 — forked from bpeterso2000/unicode_names.py
Sorted dictionary of Unicode values and corresponding names. Useful for providing hints to the user when UnicodeDecodeErrors occur.
CODENAMES = {
"\u0000": "NULL",
"\u0001": "START OF HEADING",
"\u0002": "TEXT, START OF",
"\u0003": "TEXT, END OF",
"\u0004": "TRANSMISSION, END OF",
"\u0005": "ENQUIRY",
"\u0006": "ACKNOWLEDGE",
"\u0007": "BELL",
"\u0008": "BACKSPACE",
@illucent
illucent / uniq.py
Created November 21, 2015 00:49
own version of list unification
from collections import OrderedDict
import itertools
from random import shuffle, randint
import re
from sets import Set
def f1(seq): # Raymond Hettinger
# not order preserving
set = {}
map(set.__setitem__, seq, [])
@illucent
illucent / uniqush-push
Created November 20, 2015 15:08 — forked from couraudt/uniqush-push
init.d script for uniqush-push
#!/bin/sh
### BEGIN INIT INFO
# Provides: uniqush-push
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts uniqush-push
# Description: Starts Uniqush provides a unified push service for server-side notification to apps on mobile devices.
### END INIT INFO
@illucent
illucent / .ctags
Created November 20, 2015 15:06 — forked from romainl/.ctags
My ctags config
--langmap=javascript:.js
--regex-javascript=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/F,function,functions/
--regex-javascript=/function[ \t]*([A-Za-z0-9._$()]+)[ \t]*\(/\1/F,function,functions/
--regex-javascript=/([A-Za-z0-9._$]+)[ \t]*=[ \t]*\{/\1/o,object,objects/
--regex-javascript=/^[ \t]*([A-Za-z0-9._$]+)[ \t]*[:][ \t]*[^\{]/\1/p,property,properties/
--regex-javascript=/^[ \t]+var[ \t]*([A-Za-z0-9._$]+)[ \t]*=[ \t]*[\d"'\[]/\1/v,variable,variables/
--regex-javascript=/\/\/[ \t]*(TODO)[ \t]*\:*(.*)/\1/I,{To do}/
--regex-javascript=/\/\/[ \t]*(FIXME)[ \t]*\:*(.*)/\1/I,{Fix me}/
--langdef=less