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
set shell=/bin/bash | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' " required | |
Plugin 'bling/vim-airline' |
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
source 'https://rubygems.org' | |
gem 'koala' | |
gem 'awesome_print' | |
gem 'mini_exiftool' |
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
@implementation MyTabBar | |
-(CGSize)sizeThatFits:(CGSize)size | |
{ | |
CGSize sizeThatFits = [super sizeThatFits:size]; | |
sizeThatFits.height = 100; | |
return sizeThatFits; | |
} |
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
[self.tabBar setValue:@(YES) forKeyPath:@"_hidesShadow"]; |
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
CGSize size = CGSizeMake(desiredWidth, desiredHeight); | |
UIGraphicsBeginImageContextWithOptions(size, YES, 0); | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectMake(0, 0, size.width, size.height)); | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
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 os import system | |
import random | |
while True: | |
answer = "" | |
question_year = random.randint(1000,2100) | |
while answer != str(question_year): | |
system(f"say {question_year}") | |
answer = input() |
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
# app/helpers/enum_i18n_helper.rb | |
module EnumI18nHelper | |
# Returns an array of the possible key/i18n values for the enum | |
# Example usage: | |
# enum_options_for_select(User, :approval_state) | |
def enum_options_for_select(class_name, enum) | |
class_name.send(enum.to_s.pluralize).map do |key, _| | |
[enum_i18n(class_name, enum, key), key] | |
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 glob | |
import numpy as np | |
import pandas as pd | |
import exifread | |
import imagehash | |
import IPython.display | |
from PIL import Image | |
from datetime import datetime |
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
set -g mouse on | |
setw -g mode-keys vi | |
# Smart pane switching with awareness of Vim splits. | |
# See: https://github.com/christoomey/vim-tmux-navigator | |
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | |
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | |
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" |
OlderNewer