Skip to content

Instantly share code, notes, and snippets.

Alex Hillman alexknowshtml

Block or report user

Report or block alexknowshtml

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View import_mbox error
creating categories
1 / 1 (100.0%) [6100661 items/min]
creating users
1 / 3552 ( 0.0%) [9552619 items/min] Invalid email '1...@trevortownsend.com' for 'Trevor_Townsend'. Using '02f4a4520cb43c1a258aed689de4674f@domain.com'
Error on record: {:id=>"1...@trevortownsend.com", :email=>"1...@trevortownsend.com", :name=>"Trevor Townsend", :trust_level=>1, :staged=>true, :active=>false, :created_at=>Sun, 09 Sep 2018 05:53:05 UTC +00:00}
Traceback (most recent call last):
77: from script/import_scripts/mbox.rb:7:in `<main>'
76: from script/import_scripts/mbox.rb:8:in `<module:ImportScripts>'
75: from script/import_scripts/mbox.rb:14:in `<module:Mbox>'
74: from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
View CK Pro User Styles
/* After switching stackingthebricks.com to ConvertKit in the last few months, I found a handful of things */
/* that seemed to slow me down/force additional scrolling, so I tried hiding them from the UI with these UserStyles */
/* Obviously, these are without warrantee and could potentially break, so don't blame me if they do. */
/* Also, I am not a designer so these may not make the UI better in _your_ eyes, but they make it better for me. 😅 */
/* Hide the dashboard graph (not useful enough to be there taking up 3/4 of the screen real estate every time I log in) */
.account-graph {display:none;}
/* Widen the sidebar on the dashboard/subscriber page only to keep long tags + subscriber counts from wrapping */
View gist:3c33a3a0b99c5f1961fbcfa218e15c15
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
View gist:9747917
/*Barley Overrides*/
if ( !isset($_GET['barley_editor']) || $_GET['barley_editor'] !== 'on' )
$_GET['barley_editor'] = 'off';
remove_filter('edit_post_link', 'barley_custom_edit_post_link');
// Change "Edit" to "Edit Advanced Options" when template uses edit_post_link
function indyhall_barley_custom_edit_post_link($output) {
if ( is_single() || is_page() ) { // Only replace this link on single or pages
$output = str_replace('Edit', 'Edit Advanced Options', $output);
View gist:9747882
/*Barley Overrides*/
if ( !isset($_GET['barley_editor']) || $_GET['barley_editor'] !== 'on' )
$_GET['barley_editor'] = 'off';
remove_filter('edit_post_link', 'barley_custom_edit_post_link');
// Change "Edit" to "Edit Advanced Options" when template uses edit_post_link
function indyhall_barley_custom_edit_post_link($output) {
if ( is_single() || is_page() ) { // Only replace this link on single or pages
$output = str_replace('Edit', 'Edit Advanced Options', $output);
View gist:9747864
function barley_check_conditions() {
global $current_user, $post;
if ( isset($_GET['barley_editor']) && $_GET['barley_editor'] == 'off' )
return false;
if ( (is_single() || is_page()) && (is_main_query()) && (in_the_loop()) ) {
if ( current_user_can( 'edit_others_posts' ) || ($post->post_author == $current_user->ID) ) {
return true;
View gist:7537795
curl https://api.stripe.com/v1/transfers \
-u sk_IHiqfU9wqFlw0TTOhqGINBkQXAR8g: \
-d amount=12345678 \
-d currency=usd \
-d recipient=rp_2xtdxyERwojXtS \
-d "description=Reason for this transfer"
View gist:7537764
{
"id": "btok_2yzG1vVgKGfEtq",
"livemode": true,
...
...
"bank_account": {
"object": "bank_account",
"id": "btok_2yzG1vVgKGfEtq",
...
View gist:7537754
curl https://api.stripe.com/v1/recipients/rp_2xtdxyERwojXtS \
-u sk_IHiqfU9wqFlw0TTOhqGINBkQXAR8g: \
-d bank_account=btok_2yzG1vVgKGfEtq
View gist:7537750
{
"id": "btok_2yzG1vVgKGfEtq",
"livemode": true,
"created": 1384803540,
"used": false,
"object": "token",
........
You can’t perform that action at this time.