sudo apt-get install numlockx -y
sudo vim /usr/share/lightdm/lightdm.conf.d/40-pantheon-greeter.conf
# add this line:
This file contains hidden or 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
class ManageableTimeRange < Range | |
def <=>(other) | |
leg_min(other) | |
end | |
def leg_min(other) | |
return -1 if self.min < other.min | |
return 0 if self.min == other.min | |
return 1 |
This file contains hidden or 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 app is an API only, that's why we set :json as response and as params. | |
# This is the Roda Router. | |
# This app used roda + hanami model + TRB; | |
# Those methods `present Ami::V1::Customer::Collection` are calls to the app Operations | |
# #present and #run are helper methods added to handle the response of an Operation. | |
# Basically when I `run` and operation and it is successful I'll just call Operation#decorated hash and transform it into JSON; | |
# If the operation failed then I'll create a json response with status: :unprocessable_entity and call the Operation#error.messages and add it to the json response. | |
module Ami | |
module V1 | |
class Routes < Roda |
git clone [email protected]:solus-project/linux-steam-integration.git
cd linux-steam-integration
./autogen.sh --with-real-steam-binary=/usr/games/steam --enable-frontend
sudo make
sudo checkinstall --pkgname=linux-steam-integration --pkgversion=0.2 --provides=linux-steam-integration
This file contains hidden or 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 | |
current=$(dconf read /org/gnome/desktop/input-sources/xkb-options) | |
swapped="['caps:swapescape']" | |
capslock="['caps:capslock']" | |
echo "Current status: $current" | |
if [ "$current" == "$swapped" ] | |
then | |
echo "Making caps and escape WORK NORMALLY" |
Cria os scopes lá no model de Coordinator, assim fica mais fácil organizar. PS: não esqueça de testar isso, não tenho certeza se está funcionando corretamente, só escrevi diretamente aqui no gist.
scope :assigned_to_project, ->(id) { left_outer_joins(:project).where(projects: { id: id }) }
scope :without_projects, -> { assigned_to_project(nil) }
scope :without_projects_or_assigned_to_project, ->(id) { without_projects.or(assigned_to_project(id)) }
No teu controller pode fazer algo assim:
This file contains hidden or 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 | |
# Ripped off from: https://askubuntu.com/a/41950 | |
if [ ! -d ~/.config ]; then | |
mkdir ~/.config | |
fi | |
if [ ! -d ~/.config/nvim ]; then | |
mkdir ~/.config/nvim |