Skip to content

Instantly share code, notes, and snippets.

View Frastio10's full-sized avatar
:octocat:
dead

Frastio Agustian Frastio10

:octocat:
dead
View GitHub Profile
@Frastio10
Frastio10 / code.js
Created March 31, 2024 04:52 — forked from Ashung/code.js
Figma Snippets
let layer = figma.currentPage.selection[0];
let vectorPaths = layer.vectorPaths.map(item => {
return {windingRule: 'NONZERO', data: item.data}
})
layer.vectorPaths = vectorPaths
layer.exportAsync({
format: 'SVG'
}).then(uint8Array => {
@Frastio10
Frastio10 / socket.js
Last active July 29, 2023 12:31
NodeJS basic tcp socket client and server without external library
// nodejs provided this example already on https://nodejs.org/api/http.html#http_event_upgrade
// I changed some stuffs so I can understand it better.
const http = require('http');
// Create an HTTP server
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('okay');
});
@Frastio10
Frastio10 / VAST4Test.xml
Last active March 21, 2022 07:46
testing for vast 4
<?xml version="1.0" encoding="UTF-8"?>
<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
<vmap:AdSource id="preroll-ad-1" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3"><![CDATA[url here]]></vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
<vmap:AdSource id="preroll-post-bumper" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3"><![CDATA[url here]]></vmap:AdTagURI>
@Frastio10
Frastio10 / init.vim
Last active January 24, 2022 05:38
my neovim config using vim-plug and coc
call plug#begin()
"coc
Plug 'neoclide/coc.nvim', {'branch': 'release'}
"nerdtree
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'scrooloose/nerdtree'
Plug 'ryanoasis/vim-devicons'