Skip to content

Instantly share code, notes, and snippets.

@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active April 28, 2024 22:28
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf

WeeChat Screenshot

Here I will show you how to create a bar very similar to the nicklist bar, but instead of showing nickname, it will show znc commands, whenever you click on a command, weechat will send a "help the_command_you_just_clicked" and insert the name of the command in the input bar, then enter any arguments required to the command and press enter.

You will need the following script

  1. text_item.py

Let's create the bar

@sdorra
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@micahhausler
micahhausler / register_task.py
Last active April 4, 2017 19:25
Boto3 ECS register_task_definition
import os
import boto3
def connect_ecs(region=None):
return boto3.client(
'ecs',
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID'),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY'),
region_name=region or os.environ.get('AWS_EC2_REGION', 'us-east-1'),
)
@kwmiebach
kwmiebach / pytest.md
Last active May 11, 2024 15:17 — forked from amatellanes/pytest.sh
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@pascalpoitras
pascalpoitras / config.md
Last active May 11, 2024 04:13
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@bjonord
bjonord / xps13_crunchbang.markdown
Last active December 21, 2015 05:59
Getting a Dell XPS 13 up and running with Crunchbang(Waldorf), Linux Kernel 3.10.6(or the Ubuntu Sputnik kernel) and Ruby on Rails

Getting a Dell XPS 13 up and running with Crunchbang(Waldorf), Linux Kernel 3.10.6(or the Ubuntu Sputnik kernel) and Ruby on Rails

Update 04/09-2013:

Well the sputnik kernel might have better support for the web camera and some other minor things, but all of a sudden it started crashing over and over again and I was not able to track down the reason. Back on kernel 3.10.6 and it has been running fine since, will keep this gist updated as things progress.

End of updates

I'm currently employed as a Backend developer for an e-commerce company and I received a new laptop to work on, which is a Dell XPS 13. While this laptop comes in a Ubuntu version, the one I received at work was not that model but a core I5 with Win8P.

@crmccreary
crmccreary / AESCipher.py
Created May 20, 2013 02:17
Encryption using pycrypto, AES, and PKCS5 padding
from Crypto.Cipher import AES
from Crypto import Random
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
unpad = lambda s : s[0:-ord(s[-1])]
class AESCipher:
def __init__( self, key ):
"""
@pfote
pfote / AesCrypt.py
Created March 6, 2013 13:01
AES256 with PKCS5 padding
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
import base64
import random
import hashlib
import os
class AesCrypt256:
@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git