sudo apt update
sudo apt install mariadb-server
sudo /etc/init.d/mysql start
docker run -p 27018:27017 -d --rm -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=secret --name mongo1 mongo
docker exec -it mongo1 bash
brew tap mongodb/brew
brew install mongodb-community
CREATE DATABASE dabase_name CHARACTER SET utf8mb4;
create user 'mysql_user'@'localhost' identified by 'mysql_user_password';
GRANT ALL PRIVILEGES ON dabase_name.* to mysql_user@localhost IDENTIFIED BY 'mysql_user_password';
MySQL8では IDENTIFIED BY
は使えない
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
async function postFormData(url = '', data = "") { | |
const response = await fetch(url, { | |
method: 'POST', | |
mode: 'cors', | |
cache: 'no-cache', | |
credentials: 'same-origin', | |
headers: { | |
'Content-Type': 'application/x-www-form-urlencoded', | |
}, | |
redirect: 'follow', |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "bento/ubuntu-19.10" | |
config.vm.network "private_network", ip: "192.168.33.9" | |
config.vm.synced_folder "./", "/mnt/phalcon_test" | |
config.vm.provision "shell", inline: <<-SHELL |
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
package com.example.alternate; | |
import java.sql.*; | |
import java.util.Map; | |
import java.util.Properties; | |
import java.util.concurrent.Executor; | |
public class OConnection implements Connection { | |
private Connection altConn; | |
public OConnection(Connection alternateConnection) { |
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
import java.io.IOException; | |
import java.io.InputStream; | |
import static java.lang.Thread.sleep; | |
public class MemoryLimit { | |
private static final int TRY_COUNT = 5; | |
public static void main(String[] args) throws IOException, InterruptedException { | |
double memory = 10_000_000; | |
double lastSuccessMemory = memory; |
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
import java.io.File; | |
import java.io.IOException; | |
import java.io.RandomAccessFile; | |
/** | |
* http://www.file-recovery.com/mp4-signature-format.htm | |
*/ | |
public class IsoFileReader { | |
public static void main(String[] args) throws IOException { | |
File file = new File("test1.mp4"); |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "bento/ubuntu-19.10" | |
config.vm.provider "virtualbox" do |vb| | |
vb.cpus = "2" | |
end | |
config.vm.network "private_network", ip: "192.168.33.100" |
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
import org.junit.After | |
import org.junit.Before | |
import org.junit.Test | |
import org.openqa.selenium.OutputType | |
import org.openqa.selenium.TakesScreenshot | |
import org.openqa.selenium.WebDriver | |
import org.openqa.selenium.chrome.ChromeOptions | |
import org.openqa.selenium.firefox.FirefoxOptions | |
import org.openqa.selenium.remote.RemoteWebDriver | |
import java.io.File |
NewerOlder