Skip to content

Instantly share code, notes, and snippets.

View KINKCreative's full-sized avatar

Klemen KINKCreative

  • Los Angeles, CA
View GitHub Profile
@KINKCreative
KINKCreative / email.yml
Created January 10, 2019 03:44
SilverStripe Mailgun/SMTP Mail Configuration
---
Name: myemailconfig
After:
- '#emailconfig'
---
SilverStripe\Core\Injector\Injector:
Swift_Transport:
class: Swift_SmtpTransport
properties:
Host: smtp.mailgun.org
@KINKCreative
KINKCreative / gist:7d2d4310507b9eab7251dfeecbca44f3
Created September 24, 2018 10:44
Apache Redirect to www and https
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]

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:

// 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);
<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>
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 March 30, 2016 00:05
Silverstripe 3.2 Pagination Include with $List param
<% 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 %>
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
<?php
/**
* PRODUCT EVENTS
**/
// Register Custom Post Type
function dc_events_register_events() {
$labels = array(
@KINKCreative
KINKCreative / gist:11bbdaff6540d242386b
Created September 28, 2015 16:37
Sublime Text User Settings
{
"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