Skip to content

Instantly share code, notes, and snippets.

View entr's full-sized avatar

Zlatko Zlatev entr

  • Yotpo SMSBump
  • Burgas, Bulgaria
View GitHub Profile
#!/bin/sh
#
# usage: import-cert.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}
exec 6>&1
exec > $REMHOST
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "$REMHOST" -i $REMHOST
@entr
entr / trust-hosts-cert.sh
Created January 5, 2017 11:44
Adding SSL certificates to Google Chrome Linux (Ubuntu)
#!/bin/sh
#
# usage: import-cert.sh remote.host.name [port]
# credits: http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu/
#
REMHOST=$1
REMPORT=${2:-443}
exec 6>&1
exec > $REMHOST
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
@entr
entr / composer.json
Last active May 20, 2016 10:15 — forked from spivurno/gw-gravity-forms-submission-limit.php
Gravity Wiz // Gravity Forms // Limit Submissions Per Time Period (by IP, User, Role, Form URL, or Field Value)
{
"name": "wptailor/gform-class-submission-limit",
"description": "Limit the number of times a form can be submitted per a specific time period. You modify this limit to apply to the visitor's IP address, the user's ID, the user's role, a specific form URL, or the value of a specific field.",
"require": {
},
"license": "GPL-2.0+",
"authors": [
{
"name": "Mark Jaquith",
"email": "mark@jaquith.me"
@entr
entr / metacity-theme-3.xml
Created March 28, 2016 08:45
Vertex metacity - no titlebars
<frame_geometry name="normal" title_scale="medium" rounded_top_left="3" rounded_top_right="3" hide_buttons="true" has_title="false">
<distance name="left_width" value="1" />
<distance name="right_width" value="1" />
<distance name="bottom_height" value="1" />
<distance name="left_titlebar_edge" value="3"/>
<distance name="right_titlebar_edge" value="3"/>
<distance name="title_vertical_pad" value="4"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
@entr
entr / samsung_rc
Created March 9, 2016 20:03
OpenElec SAMSUNG ue-32j5100 IR Remote keymap
#table samsung_rc, type: nec
0x70760 KEY_UP
0x70761 KEY_DOWN
0x70762 KEY_RIGHT
0x70765 KEY_LEFT
0x70768 KEY_ENTER
0x7072d KEY_EXIT
0x70758 KEY_BACK
0x7071f KEY_INFO
@entr
entr / metacity-theme-3.xml
Created February 18, 2016 08:56
Vertex metacity hide titlebar in max mode
<!-- NOTE: This is only the "max" frame_geometry -->
<frame_geometry name="max" title_scale="small" parent="normal" rounded_top_left="false" rounded_top_right="false" hide_buttons="true" has_title="false">
<distance name="left_width" value="0" />
<distance name="right_width" value="0" />
<distance name="bottom_height" value="0" />
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
<distance name="button_width" value="0"/>
<distance name="button_height" value="0"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
@entr
entr / rbenv-install.sh
Created December 7, 2015 15:31 — forked from milmih/rbenv-install.sh
Setting rbenv up globally
#!/usr/bin/env bash
if [ "$UID" -ne 0 ]
then echo "Please run this script as root user"
exit
fi
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev git sqlite3 libsqlite3-dev
@entr
entr / gw-gravity-forms-post-content-merge-tags-usage.php
Created November 16, 2015 15:32 — forked from spivurno/gw-gravity-forms-post-content-merge-tags-usage.php
Gravity Wiz // Add Support for Gravity Form Merge Tags in your Post Content (when an entry ID is passed)
<?php
# Basic
gw_post_content_merge_tags();
# With Parameters
gw_post_content_merge_tags( array(
'auto_append_eid' => false,
'encrypt_eid' => true
) );
@entr
entr / class-cws-fragment-cache.php
Last active October 28, 2015 09:39 — forked from markjaquith/gist:2653957
WordPress Fragment Caching convenience wrapper
<?php
/**
* WordPress Fragment Caching convenience wrapper.
*
* @author Mark Jaquith, packed by WPTailor
*/
defined('ABSPATH') or exit;
/*
@entr
entr / composer.json
Last active August 29, 2015 14:26 — forked from spivurno/gw-calc-subtotal.php
Gravity Wiz // Gravity Forms // Calculation Subtotal Merge Tag
{
"name": "wptailor/gravityforms-subtotal-mergetag",
"description": "Adds a {subtotal} merge tag which calculates the subtotal of the form. This merge tag can only be used",
"type": "wordpress-plugin",
"license": "GPL3+",
"authors": [
{
"name": "David Smith",
"email": "david@ounceoftalent.com"
},