Skip to content

Instantly share code, notes, and snippets.

View Tashows's full-sized avatar
💻
Working remotely

Tasos Maschalidis Tashows

💻
Working remotely
View GitHub Profile
import UploadAdapter from './upload_adapter';
function CustomUploadAdapterPlugin( editor ) {
editor.plugins.get( 'FileRepository' ).createUploadAdapter = ( loader ) => {
// Configure the URL to the upload script in your back-end here!
return new UploadAdapter( loader, editor );
};
}
import { Controller } from "stimulus"
@davidhund
davidhund / all-css-properties.json
Created April 6, 2017 13:25
W3.org All CSS Properties as JSON
[ { "property": "--*"
, "url": "http://dev.w3.org/csswg/css-variables/#propdef-"
, "status": "ED"
, "title": "CSS Custom Properties for Cascading Variables Module Level 1"
}
, { "property": "--*"
, "url": "http://www.w3.org/TR/2015/CR-css-variables-1-20151203/#propdef-"
, "status": "CR"
, "title": "CSS Custom Properties for Cascading Variables Module Level 1"
}
@maxivak
maxivak / Spree: Filter by brand.md
Last active March 16, 2021 01:31
Spree: Filter Products by properties

Fix 'scoped' error for Rails 4

error: undefined method 'scoped' solution:

# config/initializers/scoped.rb
class ActiveRecord::Base
  # do things the modern way and silence Rails 4 deprecation warnings
 def self.scoped(options=nil)

options ? where(nil).apply_finder_options(options, true) : where(nil)

@pocha
pocha / parse-ansi-to-html.rb
Created March 8, 2013 07:31
Parsing ANSI color codes in Ruby to create appropriate HTML tags. If you are parsing the output of a command that is run on a bash Terminal, the output contain color codes. This is part of the new web Terminal I am working on for [Codelearn](www.codelearn.org) . Making it public as it might help somebody else who is looking out for similar resou…
ANSI_COLOR_CODE = {
0 => 'black',
1 => 'red',
2 => 'green',
3 => 'yellow',
4 => 'blue',
5 => 'purple',
6 => 'cyan',
7 => 'white'
}
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/