To turn off without having to add options:
# application.rb
config.generators.assets = false
config.generators.helper = false
/^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9_]{1,25}$/igm
const base64 = 'data:image/png;base64,....' // Place your base64 url here. | |
fetch(base64) | |
.then(res => res.blob()) | |
.then(blob => { | |
const fd = new FormData(); | |
const file = new File([blob], "filename.jpeg"); | |
fd.append('image', file) | |
// Let's upload the file | |
// Don't set contentType manually → https://github.com/github/fetch/issues/505#issuecomment-293064470 |
import React from 'react' | |
import axios, { post } from 'axios'; | |
class SimpleReactFileUpload extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state ={ | |
file:null | |
} |
// Source for Jake Archibald's idb https://github.com/jakearchibald/idb/blob/v3.0.2/build/idb.js | |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | |
typeof define === 'function' && define.amd ? define(['exports'], factory) : | |
(global = global || self, factory(global.idb = {})); | |
}(this, function (exports) { 'use strict'; | |
function toArray(arr) { | |
return Array.prototype.slice.call(arr); | |
} |
rails new .
function toDateWithOutTimeZone(date) { | |
let tempTime = date.split(":"); | |
let dt = new Date(); | |
dt.setHours(tempTime[0]); | |
dt.setMinutes(tempTime[1]); | |
dt.setSeconds(tempTime[2]); | |
return dt; | |
} |
# Install Apache | |
sudo apt-get update | |
sudo apt-get install apache2 -y | |
# Install PHP7 | |
sudo apt-get -y install php7.0 libapache2-mod-php7.0 | |
sudo apt-get install php7.0-cli php7.0-common libapache2-mod-php7.0 php7.0 php7.0-mysql php7.0-fpm -y | |
# Other packages which might be useful |