All code is available in example app - https://github.com/maxivak/webpacker-rails-example-app
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 php:apache | |
RUN apt-get update | |
RUN apt-get -y upgrade | |
RUN apt install -y apt-utils build-essential | |
ENV IBM_DB_HOME=/opt/ibm/clidriver | |
ENV LD_LIBRARY_PATH="${IBM_DB_HOME}/lib" | |
RUN apt install -y apt-utils build-essential |
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
class CreateNoIdModels < ActiveRecord::Migration | |
def change | |
create_table :no_id_models, id: false do |t| | |
t.integer :pk1 | |
t.integer :pk2 | |
end | |
end | |
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
for(let i = 0; i < tr_length; i++) { | |
let | |
detailBtn = `[checkDetailBtn=${i}]`, | |
dropdownMenu = `[dropDownMenu=${i}]` | |
$(document).on('click', detailBtn, function(){ | |
$(dropdownMenu).slideToggle() | |
}) | |
} |
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
/* | |
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
* | |
* This code is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License version 2 only, as | |
* published by the Free Software Foundation. Oracle designates this | |
* particular file as subject to the "Classpath" exception as provided | |
* by Oracle in the LICENSE file that accompanied this code. | |
* |
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
#!/usr/bin/env ruby | |
# 五鼠遁起法 | |
class GanZhiTable | |
TIAN_GAN = "甲乙丙丁戊己庚辛壬癸".split("").freeze | |
DI_ZHI = "子丑寅卯辰巳午未申酉戌亥".split("").freeze | |
def tian_gan(index) | |
index = index - TIAN_GAN.size if index >= TIAN_GAN.size |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
int convert(string,char,char); | |
int main(void) | |
{ | |
string 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
[supervisord] | |
nodaemon=true | |
[program:sshd] | |
command=/usr/sbin/sshd -D | |
autorestart=true | |
[program:apache2] | |
command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFORGROUND" | |
autorestart=true |
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 daemon 20 | |
set logfile syslog facility log_daemon | |
set mailserver smtp.gmail.com port 587 | |
username "ERROR-EMAIL-ADDRESS" password "PASSWORD" | |
using tlsv1 | |
with timeout 30 seconds | |
set alert ERROR-EMAIL-ADDRESS | |
set httpd port 2812 and |
NewerOlder