Skip to content

Instantly share code, notes, and snippets.

View athif23's full-sized avatar
🎯
Looking for work

Muhammad Athif athif23

🎯
Looking for work
View GitHub Profile
@athif23
athif23 / wrapper-draggable.vue
Created June 13, 2020 14:34
This is wrapper component for vuedraggable library.
<script>
import draggable from 'vuedraggable'
const vuedraggableProps = {
options: Object,
// list: { type: Array, required: false, default: null }, We wouldn't really need this,
// value: { type: Array, required: false, default: null }, also this.
noTransitionOnDrag: { type: Boolean, default: false },
clone: { type: Function, default: original => (original) },
element: { type: String, default: 'div' },
@athif23
athif23 / Point in Polygon
Created September 7, 2019 15:15 — forked from superwills/Point in Polygon
Pt In Poly simple algorithm. Works for convex & concave polygons.
#include <stdlib.h> // MUST BE BEFORE GLUT ON WINDOWS
#ifdef _WIN32
#include <gl/glut.h>
#else
#include <GLUT/glut.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#endif
@athif23
athif23 / recursive-path-imba.imba
Created January 7, 2019 13:55
A way to make a recursive path in imba-router
require 'imba-router'
tag second_route
prop prevIndex
def mount
let prevIndex = router.url.split('/').lastIndexOf('Name1')
@prevIndex = prevIndex
def render
<self>
if router.url.split('/').lastIndexOf('Name1') > @prevIndex
@athif23
athif23 / 1.js
Created October 30, 2018 00:16 — forked from getify/1.js
experiment: implementing something like React's new "useState()" hook in stand-alone functions
"use strict";
[foo,bar] = TNG(foo,bar);
function foo(origX,origY) {
var [x,setX] = useState(origX);
var [y,setY] = useState(origY);
console.log(`foo: ${x} ${y}`);
@athif23
athif23 / Waktu Sholat Arah Kiblat.md
Created October 19, 2018 15:06 — forked from siswadi/Waktu Sholat Arah Kiblat.md
Waktu Sholat & Arah Kiblat w/ HTTP/JSON API

Waktu Sholat & Arah Kiblat

Informasi Waktu

https://time.siswadi.com/
https://time.siswadi.com/Asia/Jakarta
https://time.siswadi.com/help
https://time.siswadi.com/?help
https://time.siswadi.com/?timezone=Asia/Jakarta
@athif23
athif23 / FizzBuzz.js
Created September 28, 2018 05:56 — forked from jaysonrowe/FizzBuzz.js
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);