Skip to content

Instantly share code, notes, and snippets.


cdesch cdesch

View GitHub Profile
cdesch /
Last active Jan 9, 2021
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info


You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

View NginxConfig
upstream phoenix_upstream {
server {
listen 80;
return 301 https://$server_name$request_uri;
cdesch / config-webpack-environment.js
Last active Mar 31, 2020
Webpacker Deployment error
View config-webpack-environment.js
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
// const customConfig = require('./custom')
// environment.config.merge(customConfig)
// module.exports = environment
cdesch / webpacker.yml
Created Mar 31, 2020
Webpacker error webpacker.yml
View webpacker.yml
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/javascript
source_entry_path: packs
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
cdesch / gist:c21b6d52dff4a0472fe87a2530ecaf8b
Created Mar 11, 2020
FireBird Issue DNET-931 - Console Output
View gist:c21b6d52dff4a0472fe87a2530ecaf8b
/* */
/* Output of the console */
Hello World!
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.1.2-rtm-30932 initialized 'MyContext' using provider 'EntityFrameworkCore.FirebirdSql' with options: None
cdesch / DNET-931.sql
Last active Mar 11, 2020
FireBird Issue DNET-931 - SQL Script
View DNET-931.sql
/* */
/* Script */
CREATE DATABASE 'C:\data\demo.fdb' page_size 8192
user 'SYSDBA' password 'masterkey';
CONNECT "C:\data\demo.fdb"
user 'SYSDBA' password 'masterkey';
create table demo (id int primary key, foobar varchar(20) character set utf8);
View gist:343ca5581e33253a4a0270a54c6950d7
$ virtualenv -p /usr/bin/python3 virtualenv_name
$ source virtualenv_name/bin/activate
View gist:19705f2bebdcce143c1fcd8907496955
This file has been truncated, but you can view the full file.
2001 silly pacote range manifest for @types/istanbul-reports@^1.1.1 fetched in 50ms
2002 silly resolveWithNewModule @types/istanbul-reports@1.1.1 checking installable status
2003 http fetch GET 304 54ms (from cache)
2004 silly pacote version manifest for @types/istanbul-lib-coverage@2.0.1 fetched in 55ms
2005 silly resolveWithNewModule @types/istanbul-lib-coverage@2.0.1 checking installable status
2006 http fetch GET 304 55ms (from cache)
2007 silly pacote range manifest for @types/yargs@^13.0.0 fetched in 57ms
2008 silly resolveWithNewModule @types/yargs@13.0.3 checking installable status
2009 http fetch GET 304 35ms (from cache)
cdesch / Ruby
Last active Oct 14, 2019
Rails Regex
View Ruby
#regex templates
#ensure there are no special characters and the subdomain does not end with a - or _
# ensure secret contains at least one number
cdesch / errorHandlerEx.js
Created Oct 6, 2019
ReactNative ErrorHandling Example - From
View errorHandlerEx.js
const defaultHandler = (ErrorUtils.getGlobalHandler && ErrorUtils.getGlobalHandler()) || ErrorUtils._globalHandler;
const customErrorHandler = async (err, isFatal) => {
await AsyncStorage.setItem('lastError', JSON.stringify(err, Object.getOwnPropertyNames(err)));
return defaultHandler(err, isFatal);
//inside the App component:
async componentWillMount() {
You can’t perform that action at this time.