Skip to content

Instantly share code, notes, and snippets.

View wintermeyer's full-sized avatar

Stefan Wintermeyer wintermeyer

View GitHub Profile
@wintermeyer
wintermeyer / twittermute.txt
Created January 24, 2020 16:47 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@wintermeyer
wintermeyer / bash
Created April 2, 2017 19:16
Install jQuery
bin/yarn add jquery
brew install yarn
$ rails console
Running via Spring preloader in process 19706
Loading development environment (Rails 5.1.0.rc1)
>> ActionCable.server.broadcast ‘web_notifications_channel’,
message: ‘<p>Hello World!</p>’
redis: &redis
adapter: redis
url: redis://localhost:6379/1
production: *redis
development: *redis
test: *redis
gem ‘redis’, ‘~> 3.0’
class WebNotificationsChannel < ApplicationCable::Channel
def subscribed
stream_from "web_notifications_channel"
end
def unsubscribed
end
end
App.room = App.cable.subscriptions.create "WebNotificationsChannel",
received: (data) ->
$('#messages').append data['message']
rails generate channel WebNotifications
//= require rails-ujs
//= require jquery
//= require turbolinks
//= require_tree .