This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This snippet shows how TokenAuthenticatable works in Devise today. | |
# In case you want to maintain backwards compatibility, you can ditch | |
# devise's token mechanism in favor of this hand-rolled one. If not, | |
# it is recommended to migrate to the mechanism defined in the following | |
# snippet (2_safe_token_authenticatable.rb). | |
# | |
# In both snippets, we are assuming the User is the Devise model. | |
class User < ActiveRecord::Base | |
# You likely have this before callback set up for the token. | |
before_save :ensure_authentication_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- mode: emacs-lisp; lexical-binding: t -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Layer configuration: | |
This function should only modify configuration layer settings." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory | |
;; `+distribution'. For now available distributions are `spacemacs-base' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/3840x2160/?wallpapers | |
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg | |
gsettings set org.gnome.desktop.screensaver picture-uri file:///tmp/wallpaper.jpg | |
# Don't forget to make it executable via: chmod +x random-wallpaper.sh | |
# To schedule every 10 minutes: | |
# Run: crontab -e |