Skip to content

Instantly share code, notes, and snippets.

Avatar

Klemen KINKCreative

  • Los Angeles, CA
View GitHub Profile
@KINKCreative
KINKCreative / email.yml
Created Jan 10, 2019
SilverStripe Mailgun/SMTP Mail Configuration
View email.yml
---
Name: myemailconfig
After:
- '#emailconfig'
---
SilverStripe\Core\Injector\Injector:
Swift_Transport:
class: Swift_SmtpTransport
properties:
Host: smtp.mailgun.org
View gist:7d2d4310507b9eab7251dfeecbca44f3
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
RewriteCond %{HTTP_HOST} ^domain\.org$
RewriteRule (.*)$ https://www.domain.org$1 [R=301,L]
View keybase.md

Keybase proof

I hereby claim:

  • I am kinkcreative on github.
  • I am klemen (https://keybase.io/klemen) on keybase.
  • I have a public key whose fingerprint is E22C BF49 BFD6 5F12 EE9F 3A03 9A56 6553 D6EE A030

To claim this, I am signing this object:

View Silverstripe Errors in Config
// log errors and warnings
SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-warnings.log'), SS_Log::WARN, '<=');
// or just errors
SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors.log'), SS_Log::ERR);
// or notices (e.g. for Deprecation Notifications)
SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-notices.log'), SS_Log::NOTICE);
View gist:69d8a409ac12e2af54844a29f646d85d
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://bfred-it.github.io/iphone-inline-video/dist/iphone-inline-video.browser.js"></script>
View gist:01042f809f6edc4ab4959296c0571761
mkdir .ssh && touch .ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/* && curl https://github.com/kinkcreative.keys > .ssh/authorized_keys
@KINKCreative
KINKCreative / gist:67e3580239465b15ce3363f8444e2786
Created Mar 30, 2016
Silverstripe 3.2 Pagination Include with $List param
View gist:67e3580239465b15ce3363f8444e2786
<% if $List.MoreThanOnePage %>
<ul class="pagination inline-block">
<% if $List.NotFirstPage %>
<li class="arrow"><a href="$List.PrevLink"><i class="fa fa-angle-left"></i></a></li>
<% else %>
<li class="arrow unavailable"><i class="fa fa-angle-left"></i></li>
<% end_if %>
<% loop $List.Pages %>
View gist:bf96ba04629230e75d4a
Error
HTTP Error: Unsupported HTTP response status 400 Bad Request (soapclient->response has contents of the response)
***Request
POST /api/ServiceTransaction.svc HTTP/1.0
Host: test.achprocessing.com
User-Agent: NuSOAP/0.9.6 (1.124)
Content-Type: application/soap+xml; charset=utf-8
View gist:a10d65d7f10c3245e387
<?php
/**
* PRODUCT EVENTS
**/
// Register Custom Post Type
function dc_events_register_events() {
$labels = array(
View gist:11bbdaff6540d242386b
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"always_show_minimap_viewport": true,
"highlight_line": true,
"trim_trailing_white_space_on_save": true,
"ensure_newline_at_eof_on_save": true,
"copy_with_empty_selection": false,
"highlight_modified_tabs": true,
"show_line_endings": true