Skip to content

Instantly share code, notes, and snippets.

Alexander Rohmann rohmann

Block or report user

Report or block rohmann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View components.show-item.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li',
});
View blog.css
ul.display-posts-listing {
list-style:none;
}
.excerpt-dash {
display:none;
}
.listing-item {
margin-bottom: 2.5em;
@rohmann
rohmann / discourse-secure-note.rb
Last active Jun 13, 2017
Discourse Secure Note
View discourse-secure-note.rb
# name: discourse-secure-note
# about: Allow the attachment of secure notes to posts that are visible to staff and the post owner.
# version: 0.1
# authors: Alexander Rohmann
# url:
PLUGIN_NAME ||= "discourse_secure-note".freeze
after_initialize do
@rohmann
rohmann / custom-nav-walker.php
Last active Dec 12, 2016
WordPress Custom Nav walker as a template
View custom-nav-walker.php
<?php
/*
I've not tested it, but this is the result of thinking through how one might output custom navigation menu markup using a theme template file.
1. Include this class
2. Call a menu in one of your templates, and reference a template using the new arguments available. For example
wp_nav_menu( array(
View components.invoking-component.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
markup: Ember.computed('state',function(){
return `<div><strong>${this.get('state')}</strong><div><!--morph:yield--></div></div>`;
}),
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init: function () {
this._super();
Ember.run.schedule("afterRender",this,function() {
this.send("later");
});
@rohmann
rohmann / app-view.js
Created Sep 14, 2016
Add class to Ember Application (after 2.7.0)
View app-view.js
// instance-initializers/app-view.js
// With an instance initializer, we can register a component for Ember to use at the top level.
// Not ideal, but it works in the meantime until routable components drop.
import Ember from 'ember';
const AppView = Ember.Component.extend({
classNames: ['my-app'],
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View flip-row-direction.css
/**
* Add the cs-row-flip class to a row, and the column direction will be reversed.
*/
.x-container.marginless-columns.cs-row-flip {
direction: rtl;
}
.x-container.marginless-columns.cs-row-flip > .x-column {
direction: ltr;
@rohmann
rohmann / goodbye-skype.sh
Last active Mar 18, 2017
Cleanup cmd+tab and the dock by launching apps in the background. You can still open their main windows with Alfred/Spotlight.
View goodbye-skype.sh
# Go away
defaults write "$(mdfind kMDItemCFBundleIdentifier = 'com.skype.skype')/Contents/Info.plist" "LSUIElement" -string "1" && killall Skype
# Come back
defaults write "$(mdfind kMDItemCFBundleIdentifier = 'com.skype.skype')/Contents/Info.plist" "LSUIElement" -string "0" && killall Skype
# If you get any requests to use the keychain, they should go away the next time you restart your mac. You may be asked to sign into Skype again.
You can’t perform that action at this time.