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
| gem install mysql2 -v '0.5.6' -- --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config --with-ldflags="-L$(brew --prefix zstd)/lib -L$(brew --prefix openssl)/lib" --with-cppflags=-I$(brew --prefix openssl)/include |
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
| # -*- coding: utf-8 -*- | |
| import click | |
| import os | |
| import pandas as pd | |
| def file_split(file): | |
| s = file.split('.') | |
| name = '.'.join(s[:-1]) # get directory name |
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
| # How to use acme.sh to set up Let's Encrypt, with the script being run | |
| # mostly without root permissions | |
| # See https://github.com/Neilpang/acme.sh for more | |
| # These instructions use the domain "EXAMPLE.COM" as an example | |
| # These instructions: | |
| # - work on Ubuntu 18.04 and 20.04 with nginx | |
| # - use CloudFlare DNS validation |
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
| UPDATE table1 as t, | |
| ( | |
| SELECT id, a, b | |
| FROM table1 | |
| WHERE a = 9 AND b < 357 | |
| ) as temp | |
| SET t.a = 22 WHERE temp.id = t.id; |
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
| ssh -f <<name>> -N |
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
| # More robust version to update new or existing counter cache columns in your Rails app. | |
| # See: https://gist.github.com/svyatov/4225663 | |
| desc 'Update all cache counters' | |
| task :update_cache_counters => :environment do | |
| models_to_update = {} | |
| # or: Rails.application.eager_load! | |
| # Dir loads less, so it's faster | |
| Dir.glob(Rails.root.join('app/models/**/*')).each { |model| require model if File.file?(model) } |
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
| $( document ).ready(function() { | |
| var curKey = 'co.recreationsupply.' + document.title + '.currentLine'; | |
| var partsKey = 'co.recreationsupply.' + document.title + '.parts'; | |
| var parts = JSON.parse( localStorage.getItem( partsKey ) ) || {}; | |
| var cur = JSON.parse( localStorage.getItem( curKey ) ) || 0; | |
| var numLines = 0; | |
| if ( jQuery.isEmptyObject(parts) ) { |
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
| ———————————————————————————————————————————————————————————————————————————————————————————————————— | |
| BBEDIT/TEXTWRANGLER REGULAR EXPRESSION GUIDE MODIFIED 2014-01-13 : 00:12 | |
| ———————————————————————————————————————————————————————————————————————————————————————————————————— | |
| NOTES: | |
| The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use. | |
| Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete. |
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
| bundle config local.gem_name ~/Projects/gems/gem_name | |
| bundle config --delete local.gem_name |
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
| source 'https://rubygems.org' | |
| gem 'rack','1.0.1' | |
| gem 'taps' | |
| gem 'sqlite3' | |
| gem 'pg' |
NewerOlder