Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, target-densityDpi=device-dpi">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="assets/libs/jquery.mobile-1.3.1/jquery.mobile-1.3.1.min.css" />
> openssl pkcs12 -in <cert.pfx> -out <cert.pem> -nodes
The command converts the data in the <cert.pfx> file to PEM format in the <cert.pem> file. The PEM file contains all of the certificates that were in the PFX file:
- Private key
- Identity certificate
- Root certificate
- Intermediate certificate
@cmpscabral
cmpscabral / gist:111b1d2a44ae9a9c030c
Last active August 29, 2015 14:04
create samba shares
(install samba)
> apt-get install samba-common-bin samba
(create group sambashare)
> groupadd sambashare
(add current user to group sambashare)
> adduser `whoami` sambashare
(create share)
@cmpscabral
cmpscabral / backup.sh
Created August 18, 2014 11:38
backup script example
#!/bin/sh
renice 19 -p $$
ionice -c 3 -p $$
# change to script folder
cd ${0%/*}
TODAY=`date --rfc-3339=ns`
//
// Track.js - tracking scripts by alex miller
//
//
config = {};
config.track = true;// set to true in production, false in dev env
config.dump = true;// set to false in production env, true in dev
config.mixpanel = true; // <%= TRACKS_CONFIG['mixpanel'] %>; // set to true in production env, false in dev
config.googleAnaltyics = true;
server {
client_max_body_size 20M;
listen 80;
server_name _; #make sure _ is replaced with your main domain if you plan on hosting multiple sites.
root /home/wordpress/wordpress; #You can also use /home/ubuntu/your_domain
#on server block
##necessary if using a multi-site plugin
server_name_in_redirect off;
##necessary if running Nginx behind a reverse-proxy
port_in_redirect off;
<?php
/**
* Batch Mockup
* Allows batch inserts
*
* I placed this in my BaseController.php
*
* Revision 0.2
*
* @usage
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@cmpscabral
cmpscabral / gist:46deeb742e4d0e27a12c
Created January 27, 2015 18:26
mysql lock timeout
mysql> show open tables where in_use>0;
mysql> show processlist;
mysql> kill put_process_id_here;
mysql> show variables like 'innodb_lock_wait_timeout';
mysql> set innodb_lock_wait_timeout=100;
> cat /dev/null > file