Skip to content

Instantly share code, notes, and snippets.

@rolldone
rolldone / Simple docker template
Last active April 14, 2021 11:13
docker-compose-templates.md
# Simple docker template
version: '3'
services:
nginx:
image : rolldone/nginx:1
working_dir: '/var/www/html'
command : >
bash -c "
ls -a -l &&
nginx -g 'daemon off;'"

Why I hate TypeScript

Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.

Not Standard

TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.

Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.

Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!

@rolldone
rolldone / docker-php-ext-install.md
Created August 26, 2020 09:13 — forked from giansalex/docker-php-ext-install.md
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@rolldone
rolldone / Dockerfile
Created August 24, 2020 03:06 — forked from shov/Dockerfile
Docker PHP 7.2 fpm with GD jpg, png suppot
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev
@rolldone
rolldone / gist:0af2c72b8d5495bad470aa125982becf
Created August 10, 2020 08:59
Javascript basic recursive for middleware
var recursive = function(index,done,middlewares,props=null){
console.log(index,'length',middlewares.length)
if(index == middlewares.length){
return done();
}
var next = index + 1;
console.log('next',next);
console.log('index',index);
return middlewares[index](props,done,recursive.bind(this,next,done,middlewares))
@rolldone
rolldone / vscode_plugin_setting.md
Last active June 18, 2020 03:24
VSCODE Setting Plugin

PHP -> Unibeautify

{
  "JavaScript": {
    "indent_size": 2,
    "indent_char": " ",
    "indent_style": "tab",
    "beautifiers": [
      "Prettier"
 ]
Up tren
- Detect Bull m1440 dengan up lebih dari 5% sebelumnya
- Pastikan CCI kecendrungan tetap uptrend
Down akan tren
- Detect Bull m1440 dengan up lebih dari 5% sebelumnya
- Pastikan CCI sebelumnya dalam posisi puncak lebih dari 200
@rolldone
rolldone / BaseRactive.js
Last active April 8, 2020 00:41
BaseRactive Helper CLass
import Ractive from "ractive";
import Config from "Config";
Ractive.debug = true;
Ractive.defaults.delimiters = ["[[", "]]"];
Ractive.defaults.tripleDelimiters = ["[[[", "]]]"];
Ractive.defaults.isolated = true;
window.componentsHash = {}; /* GLOBAL */
Ractive.defaults.oninit = function() {
if (this.get("ref")) window.componentsHash[this.get("ref")] = this;

Salah di systemjs-importmap "Ingat import yang dist bukan yang di develop seperti src"

Uncaught SyntaxError: Cannot use import statement outside a module BaseRactive.js:1 Uncaught (in promise) SyntaxError: Cannot use import statement outside a module

@rolldone
rolldone / readme.md
Created March 22, 2020 11:21 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph