Skip to content

Instantly share code, notes, and snippets.

View 3dln's full-sized avatar
🌞
blessed

Ashkan Ashtiani 3dln

🌞
blessed
View GitHub Profile
@3dln
3dln / app.js
Last active October 16, 2020 08:39
virgool webpack tutorial
import _ from 'lodash';
import './style.css';
import Logo from './icon.png';
function component() {
const element = document.createElement('div');
element.innerHTML = _.join(['Hello', 'webpack'], ' ');
element.classList.add('hello');
const logo = new Image();
logo.src = Logo;
@3dln
3dln / webpack.config.js
Last active October 14, 2020 08:18
virgool webpack tutorial - 4-3
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
@3dln
3dln / webpack.config.js
Created October 14, 2020 07:50
virgool - webpack tutorial - 4-2
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [],
@3dln
3dln / app.js
Created October 14, 2020 07:29
virgool - webpack tutorial 4-1
import _ from 'lodash';
import './style.css';
function component() {
const element = document.createElement('div');
element.innerHTML = _.join(['Hello', 'webpack'], ' ');
element.classList.add('hello');
@3dln
3dln / webpack.config.js
Last active October 14, 2020 07:54
virgool webpack tutorial 3-1
const path = require('path');
module.exports = {
entry: './source/app.js',
output: {
filename: 'app.bundle.js',
path: path.resolve(__dirname, 'build'),
}
};
@3dln
3dln / index.js
Last active October 13, 2020 06:15
virgool - webpack 5 - tut 02
function component() {
const element = document.createElement('div')
element.innerHTML = _.join(['Hello', 'Webpack'], ' ')
return element
}
document.body.append(component())
@3dln
3dln / index.html
Created October 12, 2020 08:31
virgool - webpack 5 - tut 01
<!doctype html>
<html>
<head>
<title>Webpack 5 tutorial</title>
<script src="https://unpkg.com/lodash@4.16.6"></script>
</head>
<body>
<script src="./src/index.js"></script>
</body>
</html>
@3dln
3dln / express-boilerplate.js
Last active June 24, 2020 05:39
basic express boilerplate
const express = require('express')
const volleyball = require('volleyball')
const app = express()
app.use(volleyball)
app.get('/', (req, res) => {
res.json({
message: '🦄 Hello World! 🦄',
@3dln
3dln / flask-upload
Created May 27, 2019 12:56 — forked from dAnjou/flask-upload
Flask upload example
<VirtualHost *>
ServerName example.com
WSGIDaemonProcess www user=max group=max threads=5
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi
<Directory /home/max/Projekte/flask-upload>
WSGIProcessGroup www
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
@3dln
3dln / debug_stuff.py
Created May 25, 2019 07:35 — forked from dhrrgn/debug_stuff.py
A handy SQL debug function for Flask-SQLAlchemy
from . import app
from flask.ext.sqlalchemy import get_debug_queries
if app.debug:
app.after_request(sql_debug)
def sql_debug(response):
queries = list(get_debug_queries())
query_str = ''