Skip to content

Instantly share code, notes, and snippets.

@cecil
cecil / openssl_aliases.rc
Last active February 13, 2016 01:16
crypto notes
function opensslinfo {
# openssl x509 -text -in $i -issuer -subject -dates
FILENAME="$1"
echo openssl x509 -noout -in ${FILENAME} -issuer -subject -dates -serial
echo ${FILENAME} is valid for the following:
openssl x509 -noout -in ${FILENAME} -issuer -subject -dates -serial
}
function opensslsiteinfo-serial {
SITENAME="$1"
@cecil
cecil / imagick-notes
Last active August 29, 2015 14:04
imagemagick quick notes
function im-lowdepth {
# use imagemagick to lower the color depth of an image
# convert madmen_s04.jpg -depth 08 -colors 16 madmen_s04_d08_c16.jpg
FILEIN="$1"
filename=$(basename "$FILEIN")
extension="${filename##*.}"
filename="${filename%.*}"
for i in 08 16 32 64
do
@cecil
cecil / gist:640f61addf8db69f878f
Created September 5, 2014 23:26
ENTERPRISE LINKED IMAGES BOOKMARKLET V2
javascript:(function(){function I(u){var t=u.split('.'),e=t[t.length-1].toLowerCase();return {gif:1,jpg:1,jpeg:1,png:1,mng:1}[e]}function hE(s){return s.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/"/g,'&quot;');}function U(a){var r=[];o:for(var i=0,n=a.length;i<n;i++){for(var x=0,y=r.length;x<y;x++){if(r[x][0]==a[i][0])continue o;}r[r.length]=a[i];}return r;}var q,h,i,z=open().document;var a=[];z.write('<style type="text/css">img{max-width:100%}</style>'/*+'<p>Images linked to by '+hE(location.href)+':</p><hr>'*/);for(i=0;q=document.links[i];++i){h=q.href;if(h&&I(h))a.push([hE(h),q.innerHTML]);}a=U(a);for(i=0;q=a[i];++i){z.write('<p>'/*+q[1] --dangerous innerhtml-- +' ('+q[0]+')<br>'*/+'<img src="'+q[0]+'">');}z.close();})()
@cecil
cecil / gist:5eb6c7c90876d4491352
Created October 29, 2014 21:57
melty and wine
[c@europa mb]$ WINEARCH=win32 wine MBAA.exe
err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your 32-bit OpenGL drivers haven't been installed correctly (using GL renderer "GeForce GTX 750/PCIe/SSE2", version "2.1.2 NVIDIA 340.32").
fixme:win:EnumDisplayDevicesW ((null),0,0x32f7f8,0x00000000), stub!
fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
fixme:wbemprox:enum_class_object_Next timeout not supported
fixme:win:EnumDisplayDevicesW ((null),0,0x32cbb8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x32c9b8,0x00000000), stub!
fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}.
fixme:devenum:DEVENUM_ICreateDevEnum_CreateClassEnumerator Category {33d9a760-90c8-11d0-bd43-00a0c911ce86} not found
@cecil
cecil / gist:a270f33e994f1b106e56
Last active August 29, 2015 14:08
anime recs
https://www.youtube.com/watch?v=HBl0-teqNlM
Akira
Azumanga Daioh
Bakemonogatari
Birdy the Mighty Decode
Bubblegum Crisis (original series)
Dennou Coil
Durarara
Eureka 7
@cecil
cecil / makerepo.yaml
Last active October 9, 2023 13:33
ansible playbook to create a local yum http repo
---
- hosts: hou-dc-repo
tasks:
- name: confirm apache createrepo rsync installed
yum: name={{item}} state=installed
with_items:
- httpd
- createrepo
- rsync
- name: create dirs for centos6 and EPEL repo
@cecil
cecil / mgs-pw-codenames.txt
Last active August 29, 2015 14:10
MGS code names
Aardvark
Aardwolf
Addax
Agama
Alligator
Alpaca
Anaconda
Anemone Fish
Anopheles
Ant
@cecil
cecil / gist:9737176eee16c1e601ee
Created January 30, 2015 17:22
collectl man page
COLLECTL(1) Collectl COLLECTL(1)
NAME
collectl - Collects data that describes the current system status.
SYNOPSIS
Record Mode - read data from live system and write to file or display
on terminal
collectl [-f file] [options]
@cecil
cecil / gist:6df662b7947ef062918c
Created January 30, 2015 17:29
collectl documentation --help -x --showoptions --showsubsys --showsubopts
[root@tl-oss-00 /]# collectl --help
This is a subset of the most common switches and even the descriptions are
abbreviated. To see all type 'collectl -x', to get started just type 'collectl'
usage: collectl [switches]
-c, --count count collect this number of samples and exit
-f, --filename file name of directory/file to write to
-i, --interval int collection interval in seconds [default=1]
-o, --options options misc formatting options, --showoptions for all
d|D - include date in output
@cecil
cecil / gist:a2af982e80a58f2bdb92
Last active August 29, 2015 14:17
NAKED HEDGEHOG
Shadow There's a saying in the orient: "Loyalty to the End"...
Do you know what it means?
Sonic Being... Patriotic?
Shadow It means devoting yourself to your country. As long
as we have "Loyalty to the End" there's no point in
believing in anything... Even in those we love.
Sonic And that's the way a Hedgehog's supposed to think?