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 / certbot
Created February 5, 2017 15:11
certbot -q renew --renew-hook "service nginx reload"
# /etc/cron.d/certbot: crontab entries for the certbot package
#
# Upstream recommends attempting renewal twice a day
#
# Eventually, this will be an opportunity to validate certificates
# haven't been revoked, etc. Renewal will only occur if expiration
# is within 30 days.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@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