Search

Idea Log

a record of ideas I've come up with

Category

Uncategorized

How to add syntax highlighting to GetSimple CMS’s default editor

this has been tested on GetSimple Version 3.3.15, but probably works on others

Steps

  • Download CodeMirror (Source) Syntax Highlighting
  • unzip it in:
    • admin/template/js/ckeditor/plugins/
  • Edit:
    • admin/template/js/ckeditor/config.js
      • Find line with:
        • extraPlugins.push(‘codesnippet’);

      • Add the following line after it.
        • extraPlugins.push(‘codemirror’);

 

Source:

Advertisements

How to add more WYSIWYG options on GetSimple CMS’s toolbar

this is a quick and dirty hack to the code. It has been tested on GetSimple CMS version 3.3.15, and probably works on more.

Steps:

  • Edit: “admin/template/js/ckeditor/config.js”
  • Find the line with “config.toolbar_basic =”
  •  Change the line after it
    • From:
      [['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', 'Link', 'Unlink', 'Image', 'RemoveFormat', 'Source']];
    • To:

      [
      { name: 'document', items : [ 'Source','-','CodeSnippet','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },

      { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
      { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
      { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
      'HiddenField' ] },
      '/',
      { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
      { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
      '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
      { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
      { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
      '/',
      { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
      { name: 'colors', items : [ 'TextColor','BGColor' ] },
      { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
      ];
  •  Remove any options you don’t need. Some may not work at all
  • or you can play around with this online config tool

 

My config

[
{ name: ‘document’, items : [ ‘Source’,’-‘,’CodeSnippet’,’Preview’,’-‘,’Templates’ ] },
{ name: ‘clipboard’, items : [ ‘Cut’,’Copy’,’Paste’,’PasteText’,’PasteFromWord’,’-‘,’Undo’,’Redo’ ] },
{ name: ‘editing’, items : [ ‘Find’,’Replace’,’-‘,’SelectAll’,’-‘,’SpellChecker’, ‘Scayt’ ] },
‘/’,
{ name: ‘basicstyles’, items : [ ‘Bold’,’Italic’,’Underline’,’Strike’,’Subscript’,’Superscript’,’-‘,’RemoveFormat’ ] },
{ name: ‘paragraph’, items : [ ‘NumberedList’,’BulletedList’,’-‘,’Outdent’,’Indent’,’-‘,’Blockquote’,’CreateDiv’,
‘-‘,’JustifyLeft’,’JustifyCenter’,’JustifyRight’,’JustifyBlock’ ] },
{ name: ‘links’, items : [ ‘Link’,’Unlink’,’Anchor’ ] },
{ name: ‘insert’, items : [ ‘Image’,’Flash’,’Table’,’HorizontalRule’,’Smiley’,’SpecialChar’,’PageBreak’,’Iframe’ ] },
‘/’,
{ name: ‘styles’, items : [ ‘Styles’,’Format’,’Font’,’FontSize’ ] },
{ name: ‘colors’, items : [ ‘TextColor’,’BGColor’ ] },
{ name: ‘tools’, items : [ ‘Maximize’, ‘ShowBlocks’,’-‘,’About’ ] }
];

 

 

References

 

List of my favorite …

This is my favorite every thing list

General

Color…Snow fox white
 

Media

Book…Slaughter House five
Movie…Twelve Monkeys
TV show…Firefly

People

President…FDR
Actor…Charlie Chaplin
Artist…Andy Goldsworthy

Nature

Whale…Beluga
Mineral…Fluorite
Subatomic particle…
Bird family…Bower Birds
Element…Galium
Animal…Pink fairy armadillo
Crystal structure…
Carbon structure…

Locations

Continent…Antarctica
Country…Iceland
US State…Washington
US National Park…Yosemite

Technology

Capacitor type…ceramic
Microcontroller…Atmel AVR
OS…Debian Linux
Window manager…XFCE4
Terminal emulator…terminology
Web browser…Firefox
Ascii char…
Programming language…perl
Keyboard key…Esc
Glue…E-6000

My cheese list. Reviews, opinions, ratings

This is mostly a list to so i can remember what i like.

General Cheese Types

Name Type Rating notes
Swiss Swiss 8
Baby Swiss Swiss 7
Stilton Bleu 4
Bleu Bleu 4
low moister skim milk mozzarella mozzarella 8
paneer paneer 4 mostly flavorless
Gouda Gouda 8
Feta Feta 7
Cheese curds 7
Cotija 6
Queso Fresco
Oaxaca 9
Rancharo Queso Fresco 7
Muenster 6
String Mozzarella 8
Pepper Jack 4
Colby 6
Colby Jack 6
Cream cheese 6
Provolone 7
Havarti 6
Parmigiano-Reggiano 9
Romano 8
Asiago 7

Specific Cheeses

Manufacturer Name Type Rating notes
Babybel Mini Semi-soft 5
Beecher’s Handmade Cheese New Woman 9 spiced
Cacique Oaxaca mozzarella-ish 8 Kinda like string cheese
Cacique Ranchero Queso Fresco 7
Cacique Queso Fresco 7
Lucerne Low-moisture Part-Skim Mozzarella Mozzarella 6 low quality mozzarella
Murry’s Pawlet Swiss-ish 4
Murry’s Smoked Gouda Gouda 7
Murry’s Parrano with Truffle 4 not to my taste, not vegetarian
Murry’s Muenster Enchilado Muenster 7
Murry’s French Double Crème Brie Bree 4
Murry’s Raclette 2
Sartori Kentucky Bourbon BellaVitano 8
Trader Joe’s Toscano Cheese with Black Pepper 9 creamy, nutty, nice pepper added, good on bread or crackers
Trader Joe’s California Mild 7
Tillamook Vintage Extra Sharp White Cheddar Cheddar 9 Good, not vegetarian
Tillamook Medium Cheddar Cheddar 9 all around good
Jarlsberg Emmentaler cheese Swiss 10
Castello Edam mozzarella-ish 5 taste like cheap mozzarella, better when melted

murry’s butterkaese 2

Murry’s cheeses
wikipedia cheeses

Idea: Incorporate speaker profiles in computer audio output.

I just read that this article about Apples HomePod speaker performance, and read how the DSP corrects for the actual speakers natural imperfect frequency response.

Ideally you want you audio to have a flat frequency response.  Audio in = audio out at every frequence. Speakers aren’t perfect so this doesn’t happen.  Some are louder at lower frequencies others are louder at mid frequencies, and so on.

What the HomePod does is increases the volume on frequencies the speaker is poor at, so the speakers output has a near perfect frequency response.  This isn’t difficult for a DSP to do if you know the speakers frequency response curve, and this is common thing measured for every speaker.

So my idea is, What if you could enter you speakers “Brand” and “Models number” into your computer and have its DSP auto-correct for your speakers imperfect frequency response.  This should be fairly easy to do.  A database of speaker profiles would have to be created, but after that computer DSPs already accept custom frequency response profiles (bass-boost, vocal, etc)

I have a similar thing with my digital camera and graphics editor.  I can enter my cameras lens in the graphics program and it will correct for my lenses slight distortions in color, geometery, etc.  And this is much more complex than speaker profiles.  Its hard to believe no ones done this.

Some possible challenges.  Speakers distort if volumes are too high volumes.  Having DSPs correcting for speakers poor outputs at certain frequencies  may require the volume to increase at that frequency to make the distortion noticeable.  So these factors would have to be added to the speakers profile.  Such as max volume profile curve to each frequency.  Another factor is the amplifier, or any other stages between computer and speaker.  Audio amplifiers ideally have flat frequency responses, but this is not always true.  So these profiles may want to be added as well.  But these are minor difficulties and easy to correct.

So if anybody want to take up this idea and make it reality, go for it.

Blog at WordPress.com.

Up ↑