Skip to content

Instantly share code, notes, and snippets.

View james-see's full-sized avatar
🍀
make your own luck

JC james-see

🍀
make your own luck
View GitHub Profile
@james-see
james-see / _.md
Last active August 29, 2015 14:23
circle the square
@james-see
james-see / securing_wordpress_guide.md
Last active January 25, 2018 10:47
A ever-evolving guide on how I lockdown a new digital ocean wordpress droplet.

This guide is meant to be a signpost to guide the way, not a dictionary to memorize. Your mileage may vary. Two great sites to check speed and security: http://tools.pingdom.com/fpt/ & https://securityheaders.io

Initial setup

GET DIGITAL OCEAN

Buy a new Digital Ocean droplet with Wordpress pre-installed ($10 per month).

CREATE USERS AND LOCK DOWN SSH

ssh into the new instance based on the credentials Digital Ocean provided.

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GS d+ s+: !a C++ UL+++ P+ L++ E W+++ N++ o-- K- w--
O- M++ V+ PS PE Y PGP++ t 5 X++ R tv b++ DI- D+
G-- e+ h---- r+++ y++++
------END GEEK CODE BLOCK------
@james-see
james-see / opencv3_build.sh
Last active February 2, 2016 14:58
how to get cv2 to import in python 3 on OSX
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D PYTHON3_PACKAGES_PATH=/lib/python3.5/site-packages \
-D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5m.dylib \
-D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON \
-D BUILD_opencv_python3=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
<img src="cid:0123456789">
--boundary
Content-Type: image/png; name="dgi-only-100.png"
Content-Disposition: inline; filename="dgi-only-100.png"
Content-Location: dgi-only-100.png
Content-ID: <0123456789>
Content-Transfer-Encoding: base64
iVBORw0KGgoAAAANSUhEUgAAAGQAAAAmCAYAAAAycj4zAAATCUlEQVR4AbVbCXhUVZZ2cXTG+drRprVn0HG6W1tkzxLIkkCCII0KCkhEDASyJBAWEQcVtbUzM4oLCsMCGiPBYAhQWSpkr+ypSmVJZd+XSlLZ9z1kT06fc8ONj/qqkpeKfb/vfO/x8uq+c885/1nOvdwzv2F//3Omu373/GrHBb8mLVr06m9w8vuQft2xdOmDzxtt/cMyi912S8x27F+8asfFJRY740zs9pea2LlrTOwOaExsXQuXrLaXLlm148PlFm9teHbF9qcM/+CzD+FHH5yd6L17/mne6zOy3veO2QsezSbr3Bt/TTK2dVUbrXVWIl1YYvnmevzUvYby+MyKbU8st9ljb7TG+QecN9fE1r0XhQ9m6w8yQv7B9IUDSPuJ6B6fe7C/ma5zB2Nbt078bexKa8f9Tz6/foFo3Vs47DW2c8szWuuUq49WIi2xdMxdtHp3rtvRryTzMzZL+98a27po2KJoQUh05fe6nxHpfk9IJCSad9WGQyiU/WC01kVCSJwDe/euNHe0MVrj5G1i69ZI89FcKGian+bUInc9xBXElEfKKUd0vTErLp596RHjtS7l/JtCovlWrnWDZdYuyNNB2Onyf3D6UjAERqWUzkshy6z2vE1MmiDTU+TOrqZ0pcXoeMbfI+LP+MI5sffvJmT8MKxcs09qamo6K6yXrt71AhpKFM47vmr9Ia6AWb/BeeMkfMbv7xjf+Aorx4Mz8UBoonf5d4wRk

LSB STEGANOGRAPHY FOR PYTHON 3 and OPENCV 3.0+

contact securely via my pgp key:

https://keybase.io/jamescampbell/key.asc

This is a fork of the LSB-Steganography script, the original readme is below. Pablo Riotort did a nice job in his fork of updating the functionality to simple key term calls from the command line to do various operations.

WHY A FORK?

@james-see
james-see / steg_demo.html
Last active October 4, 2021 07:06
steganography.js demo
<!DOCTYPE html>
<html lang="en">
<head>
<title>Information Hiding: Steganography done with JavaScript</title>
<meta content="index, follow" name="robots">
<meta content="Peter Eigenschink" name="author">
<meta content="This demo shows the core functionality of my JavaScript library steganography.js, which provides functions to hide or read data in or from the alpha channel of an image." name="description">
<meta content="steganography, information hiding, javascript, html5" name="keywords">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
@james-see
james-see / sparse image osx
Last active March 14, 2016 19:37
how to create an encrypted password-protected auto-expanding virtual disk image in OSX
I use this approach and keep it in my dropbox for safe keeping across devices.
1. open Disk Utility
2. File > Create New Image (⌘ + N)
3. save as name of your image
4. where > set directory to save it to
5. leave size default, change format to MS-DOS(FAT) so that it works everywhere
6. Encryption > set to 256 AES (it will prompt for password here after you change this)
7. Partitions > set to single GUID
8. Image Format > set to sparse disk image
@james-see
james-see / preferences.sublime-settings
Last active May 11, 2016 20:15
my sublime text 3 configuration json to easily setup new VMs & machines
/**
* use https://github.com/YabataDesign/afterglow-theme for theme
**/
{
"always_show_minimap_viewport": false,
"bold_folder_labels": true,
"color_inactive_tabs": true,
"color_scheme": "Packages/User/SublimeLinter/Afterglow-twilight (SL).tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_options": "subpixel_antialias",
@james-see
james-see / aria_install.sh
Last active May 19, 2016 20:02
quick install script to get aria up and running on nginx local or public web server for windows, linux, or OSX. don't forget to chmod +x
#!/usr/bin/env bash
# check os
#
# . .-.-.- . -.-. ..-.---. . .
# /_\|-' | /_\ | |\|`-. |/_\| |
# ' '`--'-' ' -'-' '`-' ' '-'-'
# dont forget to run server as aria2c --enable-rpc --rpc-listen-all --rpc-secret helloworldhelloworld
# Author: James Campbell
# Date working: May 19th 2016
# What: Installs nginx, aria2, pyaria2, and webui-aria2 in one swoooooooooop.