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
require: rubocop-rails | |
Rails/UniqueValidationWithoutIndex: | |
Enabled: false | |
Rails/SkipsModelValidations: | |
Enabled: false | |
Rails/SaveBang: | |
Enabled: false |
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
from __future__ import annotations | |
class Gungan(): | |
__instance = None | |
# whatever our particular hero does | |
def __init__(self) -> None: | |
# whatever config you want to do here | |
Gungan.__instance = self | |
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
call plug#begin() | |
Plug 'preservim/NERDTree' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'tpope/vim-rails' | |
Plug 'tpope/vim-endwise' | |
Plug 'dense-analysis/ale' | |
Plug 'Shougo/deoplete.nvim' | |
Plug 'roxma/nvim-yarp' |
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
import UIKit | |
extension Github { | |
var clippy: String { | |
return "To continue using Github, please install Edge." | |
} | |
} | |
let sadness = Github.clippy |
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
// for Coder Radio 280 | |
//: Playground - noun: a place where people can play | |
import UIKit | |
class Gungan { | |
var name: String = "" // I am not optional, so I must have an initializer | |
var fifthGradeDiploma: String? // I, sadly, am an optional | |
func greet(jedi: String) -> String { |
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 is a sample Slack bot built with Botkit. | |
This bot demonstrates many of the core features of Botkit: | |
* Connect to Slack using the real time API | |
* Receive messages based on "spoken" patterns | |
* Reply to messages |
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
DEFAULT_NAME="$(git config user.name)" | |
DEFAULT_EMAIL="$(git config user.email)" | |
export OLD_NAME="${1:-$DEFAULT_NAME}" | |
export NEW_NAME="${2:-$DEFAULT_NAME}" | |
export NEW_EMAIL="${3:-$DEFAULT_EMAIL}" | |
echo "Old:" $OLD_NAME "<*>" | |
echo "New:" "$NEW_NAME <$NEW_EMAIL>" | |
echo "To undo, use: git reset $(git rev-parse HEAD)" |
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
keystore_file = ARGV[0] | |
if keystore_file | |
cmd = 'keytool -list -v -keystore' + ' ' + keystore_file + '| grep "Alias name\|Creation date"' | |
puts system(cmd) | |
else | |
puts 'please pass in a keystore file' | |
end |
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
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Erorr" message:@"All fields are required." delegate:self cancelButtonTitle:self otherButtonTitles:nil]; |
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 is meant to go along with Coder Radio Episode 204 | |
// Optional types in Swift 101 | |
struct JarJar { | |
var senateSpeach: String? // the '?' means messa might be nil and makes me an Optional type | |
func voteOfNoConfidence() { | |
// attempting to use the senateSpeach var but not setting it's value | |
let isSith = senateSpeach?.containsString("something something darkside") // senateSpeach is nil |
NewerOlder