Skip to content

Instantly share code, notes, and snippets.

@prellele
prellele / gist:1825744
Created February 14, 2012 10:48
Using StartSSL Certs with Nginx-Webserver

NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html

Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key

Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key

@ck-on
ck-on / ocp.php
Last active March 25, 2024 09:30
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@NV
NV / Readme.md
Last active May 28, 2023 20:42
Prepend the debugger statement to a function as easy as stopBefore('Element.prototype.removeChild'). Works in Chrome DevTools and Safari Inspector, doesn’t work in Firebug‘s and Firefox Developer Tools‘ console (I don’t know why). Works as a standalone script everywhere.

stopBefore.js

2min screencast

Examples

stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
@GreatPotato
GreatPotato / gist:5445303
Last active July 27, 2016 11:00
Gets the security details of a LS installation (including encryption key)
<?php
print_r( Phpr_SecurityFramework::create()->get_config_content() );
?>
@snetty
snetty / extended_activerecord.php
Created May 21, 2013 12:09
Import form fields and columns from one model to another
<?php
class Extended_ActiveRecord extends Db_ActiveRecord{
public function import_column_definitions(Db_ActiveRecord $model, $context=null){
My_Helper::import_column_definitions($model, $this, $context);
}
public function import_form_field_definitions(Db_ActiveRecord $model, $context=null, $force_tab=null){
My_Helper::import_form_field_definitions($model, $this, $context, $force_tab);
}
@jasonlewis
jasonlewis / create-project.sh
Last active February 10, 2023 12:04
Bash script that creates a new project and virtual host for that project. Can also be used to quickly create a new Laravel project.
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
create-project-usage() {
@cballenar
cballenar / data-print.css
Last active December 22, 2015 09:58
Adding the data-print attribute to an element, will print the value after the element. This addresses elements that may contain information you want to see only when printed. This is a variation of the HTML5Boilerplate's solution to links [https://github.com/h5bp/html5-boilerplate/blob/master/doc/css.md#print-styles] . Live example: http://jsbin…
@media print {
/* data-print="print-me"
* ==================================
* Adding the data-print attribute to an element, will print the value after the element.
* This addresses elements that may contain information you want to see only when printed.
*
* This is a variation of the HTML5Boilerplate's solution to links
* [https://github.com/h5bp/html5-boilerplate/blob/master/doc/css.md#print-styles]. */

Security Now
TechTV's Leo Laporte and I (Steve Gibson) take 30 to 90 minutes near the end of each week to discuss important issues of personal computer security. Sometimes we'll discuss something that just happened. Sometimes we'll talk about long-standing problems, concerns, or solutions. Either way, every week we endeavor to produce something interesting and important for every personal computer user.

This Week in Tech Your first podcast of the week is the last word in tech. Join the top tech pundits in a roundtable discussion of the latest trends in high tech.

Javascript Jabber
Your Prototype for Great Code

The Changelog

@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}