Skip to content

Instantly share code, notes, and snippets.

View verdipratama's full-sized avatar
🧑‍💻
I have no idea how to code

Verdi Pratama verdipratama

🧑‍💻
I have no idea how to code
View GitHub Profile
@verdipratama
verdipratama / .editorconfig
Created March 2, 2019 06:09
My editorconfig setup
# EditorConfig. Frontend. Default. Namics.
# @see: http://EditorConfig.org
# install a plugin to your editor: http://editorconfig.org/#download
# mark: not all plugins supports the same EditorConfig properties
# This is the top-most .editorconfig file (do not search in parent directories)
root = true
### All files
[*]
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
@verdipratama
verdipratama / eslint_prettier_airbnb.md
Created October 12, 2019 13:50 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@verdipratama
verdipratama / ttf-vista-fonts-installer.sh
Created October 6, 2020 17:19
Microsoft Vista TrueType Fonts 2020
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007.
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas.
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today.
# Dependencies: wget, fontforge and cabextract
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
@verdipratama
verdipratama / laravel-socket-io.md
Created January 11, 2021 12:33 — forked from brainlagid/laravel-socket-io.md
Setup Laravel with Socket.io [Ubuntu 20.04]

Server Requirement

  • Redis sudo apt install redis-server
  • Composer here
  • npm sudo apt install nodejs npm
  • laravel-echo-server npm install -g laravel-echo-server

Laravel Dependencies Requirement

  • predis
  • laravel-echo
  • socket.io-client ^2.4.0 issue
@verdipratama
verdipratama / Knex-Migrations-Seeding.md
Created February 22, 2021 07:04 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@verdipratama
verdipratama / README.md
Created May 12, 2021 11:26 — forked from greyscaled/README.md
Sequelize + Express + Migrations + Seed Starter
@verdipratama
verdipratama / sample.png
Created October 16, 2021 22:11 — forked from jirutka/sample.png
Nested numbered list with correct indentation in CSS. Live example at http://jsfiddle.net/a84enL8k/.
sample.png
layout title
post
xss cheat sheet

# xss-cheat-sheet

# Basics Xss

HTML Context - Simple Tag Injection

@verdipratama
verdipratama / InfiniteScroll.js
Last active October 23, 2021 19:49
React infinite scroll in few lines!
import React, { useEffect, useState, useRef } from 'react'
const divStyle = {
color: 'blue',
height: '250px',
textAlign: 'center',
padding: '5px 10px',
background: '#eee',
marginTop: '15px',
}