Skip to content

Instantly share code, notes, and snippets.

- no more tab clutter
Preferences > Editor > General > Editor Tabs > Tab limit > 1 (instead of 10)
- disable spellchecker
Editor > Inspections > Spelling > Typo > disable everything
- disable auto-folding
Editor > General > Code Folding > Imports
Editor > General > Code Folding > HTML 'style' attribute
angular2+:
@dechimp
dechimp / gist:30f836b5cd79b5627622db8988b8ba21
Last active January 19, 2018 13:41
a helper for very wordy Semantic UI responsive grid class names
export class SuiResponsiveHelperService {
// <div class="{{suiClass.mobileAndLargerColumn(12,11)}}">
// will translate to
// <div class="twelve wide mobile eleven wide tablet eleven wide computer column">
mobileAndLargerColumn(mobile: number, larger: number): string {
return `${this.mobileAndLarger(mobile, larger)} column`;
}
mobileAndLargerRow(mobile: number, larger: number): string {
return `${this.mobileAndLarger(mobile, larger)} row`;
}
@dechimp
dechimp / gist:71ed4dd9d1383d8d6e16e995f99a4cc2
Last active January 19, 2018 13:47
Rails mailer troubleshooting checklist (when emails arent sending)
Mail Not Sending Checklist
- Have you tried sending to other email addresses?
- Are delivery errors being raised? development.rb:
config.action_mailer.raise_delivery_errors = true
- Have you double-checked your config.action_mailer.smtp_settings?
- Are you making sure to call deliver_now / deliver_later?
- Are the proper environment variables loaded?
- Have you tried sending 'from' another email address?
- [Mailgun] have you added test email addresses to the test mailer service's 'authorized recipients' list?
@dechimp
dechimp / gist:4726e39826a68e52320e
Last active August 29, 2015 14:24
A base class for unit testing in CodeIgniter
<?php
/* To create tests, you can extend this class and create methods that begin with 'test_',
* like 'test_square_is_a_quadrilateral'. Inside those methods you can include your unit
* tests like $this->unit-run(), etc. You should echo the results inside those methods.
* Viewing subclass#index in the browser should execute and display all tests.
*/
class CI_Test extends CI_Controller
{
public $testnames;
@dechimp
dechimp / gist:34cb974dc5257571c6ee
Last active August 29, 2015 14:16
Hide threads in 8chan catalog with CMD+Left Mouse click
// Simple snippet to hide 8chan threads in catalog view (4chan does this with shift+LMB).
// This script is currently set to Ctrl/Cmd key + left mouse. To change the modifier key, just adjust this line:
// if(e.ctrlKey || e.metaKey)...
// Hidden thread id's are stored as a cookie. Clear cookies to see the hidden threads again.
// You can add custom JS to 8chan by clicking Options in the top right corner
$(function() {
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
{"lastUpload":"2020-10-07T00:07:30.463Z","extensionVersion":"v3.4.3"}