Skip to content

Instantly share code, notes, and snippets.

View kwhandy's full-sized avatar
🍉
sharing-is-caring

Handy Wardhana kwhandy

🍉
sharing-is-caring
  • Indonesia
View GitHub Profile
@kwhandy
kwhandy / outline-server-setup.md
Created June 10, 2020 22:38 — forked from okeehou/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server, use Outline Manager for Windows and connect to your Outline Server on Windows and Anroid.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

@kwhandy
kwhandy / Part1. Basic
Created September 29, 2020 12:42 — forked from DerevenetsArtyom/Part1. Basic
[Upload Images with AJAX] #django #ajax
# Ajax jQuery
function upload(event) {
event.preventDefault();
var data = new FormData($('#ajax').get(0));
console.log(data)
$.ajax({
url: '/image_load/', // same url 'action' in form
type: 'POST',
data: data,
@kwhandy
kwhandy / index.html
Created December 18, 2020 05:58 — forked from pxwee5/index.html
Static Vue SFC
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello World</title>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/http-vue-loader"></script>
</head>
<body>
<h1>Static HTML With Vue.js Single File Component</h1>
@kwhandy
kwhandy / AppWorld.vue
Created December 18, 2020 05:59 — forked from pxwee5/AppWorld.vue
Static Vue SFC
<template>
<span>World</span>
</template>
<script>
module.exports = {
mounted () {
console.log('Hello World')
}
}
@kwhandy
kwhandy / memcached_macosx.md
Created July 24, 2021 13:16 — forked from tomysmile/memcached_macosx.md
Installing memcached on Mac with Homebrew and Lunchy

Installing memcached on Mac with Homebrew and Lunchy

This is a quick guide for installing memcached on a Mac with Homebrew, and starting and stopping it with Lunchy. I hope this tutorial will get your memcached up and running in no time.

Step 1 — Install Homebrew

Installing Homebrew is super easy. Just paste this in your terminal —

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@kwhandy
kwhandy / creative-cloud-disable.md
Created August 7, 2021 12:45 — forked from andreibosco/creative-cloud-disable.md
disable creative cloud startup on mac
@kwhandy
kwhandy / post.rb
Created December 13, 2021 05:28 — forked from matenia/post.rb
Use custom method for FriendlyId (Example)
class Post < ActiveRecord::Base
# for SO: http://stackoverflow.com/questions/10481389/friendly-id-with-two-parameters
# EXAMPLE ASSUMES YOU ARE USING FRIENDLYID 4.X
# AND THAT YOU HAVE A SLUG:STRING COLUMN ON THE MODEL
# ...
extend FriendlyId
friendly_id :generate_custom_slug, :use => :slugged
# ...
@kwhandy
kwhandy / README.md
Created September 10, 2022 07:35 — forked from leastbad/README.md
Choices.js Stimulus wrapper preview

Choices.js Stimulus wrapper

https://joshuajohnson.co.uk/Choices/

Soon, this will be published as an NPM package, but there's an absence of documentation right now. It supports almost all functions from the original library; soon it will support 100% of them.

This wrapper adds Ajax pre-fetch search. Happens if controller has a data-search-path attribute.

Stimulus controller targets use new v2 syntax. Controller attaches a reference to itself on the element so that you can access the internal state from external scripts.