Hello there, good folks! Today I created direct messaging screen with bubbles, nice smooth animation, and some cool dynamics, with pure css3 and html5 with almost no jQuery. How do you like it? :)
A Pen by Momcilo Popov on CodePen.
import React from 'react' | |
import axios, { post } from 'axios'; | |
class SimpleReactFileUpload extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state ={ | |
file:null | |
} |
let jobs = [{id:44,selected:false},{id:12,selected:true}] | |
const handleChange = (item) =>{ | |
let existItemIndex; | |
jobs.map((job,index)=>{ | |
(job.id === item.id) && (existItemIndex = index) | |
}) | |
if(!existItemIndex){ | |
jobs = jobs.concat(item) | |
} |
Hello there, good folks! Today I created direct messaging screen with bubbles, nice smooth animation, and some cool dynamics, with pure css3 and html5 with almost no jQuery. How do you like it? :)
A Pen by Momcilo Popov on CodePen.
var express = require('express'); | |
var proxy = require('http-proxy-middleware'); | |
var options = { | |
logLevel: 'debug', | |
target: 'https://api.airtable.com/v0/' + process.env.APP_ID, | |
changeOrigin: true, | |
headers: { | |
'Accept': 'application/json', | |
'Authorization': 'Bearer ' + process.env.API_KEY | |
}, |
# 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 |
API | Status Codes |
---|---|
[Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
[Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
[Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
[Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
[NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
[Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
[Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
const counter = (state=0,action) => { | |
switch(action.type){ | |
case 'INCREMENT': | |
return state+1; | |
case 'DECREMENT': | |
return state -1; | |
default: | |
return state; | |
} | |
} |
$.fn.serializeObject = function() { | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); | |
} else { |
window.onerror = function(message, file, line, column, error) { | |
error = error || {}; | |
$.ajax({ | |
method: 'POST', | |
url: 'https://yourapp.com/path/to/error/log', | |
data: JSON.stringify({ | |
message: message, | |
file: file, | |
line: line, | |
column: column, |
<VirtualHost *:443> | |
SSLEngine On | |
SSLCertificateFile /etc/apache2/ssl/__optacredit_com.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/optacredit.com.key | |
SSLCACertificateFile /etc/apache2/ssl/__optacredit_com.ca-bundle | |
ServerAdmin admin@yourdomain.com | |
ServerName optacredit.com | |
DocumentRoot /var/www/html/ | |
#ErrorLog /var/www/yourdomain.com/logs/error.log | |
#CustomLog /var/www/yourdomain.com/logs/access.log combined |