Skip to content

Instantly share code, notes, and snippets.

View drawcode's full-sized avatar
😎
Shipping product

Ryan Christensen drawcode

😎
Shipping product
View GitHub Profile
@drawcode
drawcode / README.md
Created February 5, 2014 09:03 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
crypto = require('crypto');
#Quick MD5 of text
text = "MD5 this text!"
md5hash1 = crypto.createHash('md5').update(text).digest("hex")
#MD5 of text with updates
m = crypto.createHash('md5')
m.update("MD5 ")
m.update("this ")
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr -config <path>
@drawcode
drawcode / AESGCM.cs
Created January 20, 2014 18:58 — forked from jbtule/AESGCM.cs
/*
* This work (Modern Encryption of a String C#, by James Tuley),
* identified by James Tuley, is free of known copyright restrictions.
* https://gist.github.com/4336842
* http://creativecommons.org/publicdomain/mark/1.0/
*/
using System;
using System.IO;
using System.Text;
@drawcode
drawcode / AESGCM.cs
Created January 20, 2014 18:57 — forked from jbtule/AESGCM.cs
/*
* This work (Modern Encryption of a String C#, by James Tuley),
* identified by James Tuley, is free of known copyright restrictions.
* https://gist.github.com/4336842
* http://creativecommons.org/publicdomain/mark/1.0/
*/
using System;
using System.IO;
using System.Text;
@drawcode
drawcode / Audio.cs
Created January 6, 2014 08:47
AudioSource
using UnityEngine;
using System.Collections;
public class CSBars : MonoBehaviour {
@drawcode
drawcode / amazonlamp.ec2
Last active December 26, 2015 23:09
amazon lamp
To install and start the LAMP web server
Connect to your instance.
To ensure that all of your software packages are up to date, perform a quick software update on your instance. This process may take a few minutes, but it is important to make sure you have the latest security updates and bug fixes.
Note
The -y option installs the updates without asking for confirmation. If you would like to examine the updates before installing, you can omit this option.
[ec2-user ~]$ sudo yum update -y
Now that your instance is current, you can install the Apache web server, MySQL, and PHP software packages. Use the yum groupinstall command to install multiple software packages and all related dependencies at the same time.
@drawcode
drawcode / cmd.bash
Created October 30, 2013 06:38
lsblk
# list drives
lsblk
#mount drive
Use the lsblk command to view your available disk devices and their mount points (if applicable) to help you determine the correct device name to use.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda1 202:1 0 8G 0 disk /
xvdh 202:112 0 100G 0 disk

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@drawcode
drawcode / gist:7209807
Created October 29, 2013 06:07
Path bash
echo $SHELL
Bash has a profile, .bash_profile, within the root of each user account. In this profile you can add items to your PATH. It is a hidden file so therefore its name is preceded with a "dot." From the prompt, you can list all files--including the hidden files--with this command:
ls -a
If the .bash_profile doesn't exist then you must create one.
In the file, add this line: