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
| #compdef kucli | |
| _kucli() { | |
| local config_file | |
| local git_root=$(git rev-parse --show-toplevel 2>/dev/null) | |
| if [[ -n "$git_root" && -f "$git_root/config/kucli.yml" ]]; then | |
| config_file="$git_root/config/kucli.yml" | |
| elif [[ -f "$PWD/config/kucli.yml" ]]; then | |
| config_file="$PWD/config/kucli.yml" |
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 | |
| # Script to generate HTML git log with author avatars using glab CLI | |
| # Usage: ./git_log_with_avatars.sh <git-range> | |
| # Example: ./git_log_with_avatars.sh main..HEAD | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <git-range>" | |
| echo "Example: $0 main..HEAD" | |
| exit 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
| #!/usr/bin/env python3 | |
| """ | |
| HP Printer EWS USB Proxy | |
| ======================== | |
| Exposes the HP printer's Embedded Web Server (EWS) through a local HTTP proxy, | |
| forwarding requests over USB bulk endpoints. | |
| Useful when the printer is not yet on WiFi and its web UI is unreachable | |
| over the network. |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| # Activate the gem you are reporting the issue against. |
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
| javascript:(function(){div=document.createElement('div');e=document.createElement('g:plusone');div.style.position='fixed';div.style.bottom='8px';div.style.right='8px';div.appendChild(e);document.body.appendChild(div);e=window.document.createElement('script');e.setAttribute('src','https://apis.google.com/js/plusone.js');document.body.appendChild(e);})(); |
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
| # Goal: Allow addition of instances to a collection in a factory-built object | |
| # when those instances require references to the parent. | |
| # Typically occurs in Rails when one model has_many instances of another | |
| # See more at: | |
| # http://stackoverflow.com/questions/2937326/populating-an-association-with-children-in-factory-girl | |
| # Usage | |
| # Foo has_many :bar | |
| # |
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
| # Install Oh My ZSH | |
| $ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| # Install ruby with RVM and Homebrew | |
| $ xcode-select --install | |
| $ sudo xcodebuild -license | |
| $ gcc --version | |
| $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| $ brew doctor | |
| $ \curl -sSL https://get.rvm.io | bash -s stable --ruby |
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
| #### Contents of the preconfiguration file (for xenial) | |
| ### Localization | |
| # Preseeding only locale sets language, country and locale. | |
| d-i debian-installer/locale string fr_FR | |
| # The values can also be preseeded individually for greater flexibility. | |
| #d-i debian-installer/language string en | |
| #d-i debian-installer/country string NL | |
| #d-i debian-installer/locale string en_GB.UTF-8 | |
| # Optionally specify additional locales to be generated. |
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
| # db/migrate/XXXXXXXXXXXXX_add_authentication_token_to_users.rb | |
| class AddAuthenticationTokenToUsers < ActiveRecord::Migration | |
| def change | |
| add_column :users, :authentication_token, :string | |
| add_index :users, :authentication_token, :unique => true | |
| end | |
| end |
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
| Add support for db evolutions: | |
| Download the sqlite-dialect from here: https://github.com/gwenn/sqlite-dialect | |
| Compile it to a jar file. | |
| Add the jar file the app/lib folder. |
NewerOlder