Skip to content

Instantly share code, notes, and snippets.

View kelaspajak's full-sized avatar
😀
amazing

kelaspajak kelaspajak

😀
amazing
View GitHub Profile
//membuat layout dari terang menjadi gelap
<div
class='absolute bottom-0 left-0 right-0 z-10 pointer-events-none isolate h-50'
>
<div
style='-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)'
class='absolute inset-0 gradient-mask blur-[1px]'></div><div
style='-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)'
class='absolute inset-0 gradient-mask blur-[2px]'></div><div
/** @type {import('prettier').Config} */
module.exports = {
endOfLine: "lf",
semi: false,
singleQuote: false,
tabWidth: 2,
trailingComma: "es5",
importOrder: [
"^(react/(.*)$)|^(react$)",
"^(next/(.*)$)|^(next$)",
// Tailwind colors for Flexoki theme by Steph Ango. https://stephango.com/flexoki
const colors = {
base: {
black: '#100F0F',
950: '#1C1B1A',
900: '#282726',
850: '#343331',
800: '#403E3C',
700: '#575653',
@kelaspajak
kelaspajak / Google Script Shared Files Permissions.gs
Created April 3, 2020 09:43 — forked from davidoso/Google Script Shared Files Permissions.gs
Google script for job on Upwork: Script to load shared Drive files information into a Sheet
// References:
// Class File Iterator: https://developers.google.com/apps-script/reference/drive/file-iterator
// Class File: https://developers.google.com/apps-script/reference/drive/file
// Class User: https://developers.google.com/apps-script/reference/drive/user
// Enum Access: https://developers.google.com/apps-script/reference/drive/access
// Enum Permission: https://developers.google.com/apps-script/reference/drive/permission
// https://stackoverflow.com/questions/51836325/writing-the-result-of-geteditors-and-getviewers-to-google-sheets
// https://stackoverflow.com/questions/22365681/correct-usage-of-driveapp-continuefileiteratorcontinuationtoken
// Uncomment to add a custom menu to manually trigger main function
@kelaspajak
kelaspajak / download csv from drive
Created April 3, 2020 08:50
bash script for download csv from google drive
#!/bin/bash
fileid="paste file id"
filename="filename.csv"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /Users/{{username}}/Documents/GitHub/Folderto_go/_data/${filename}
---
layout: nil
permalink: /data/top5.json
description: simpan di _pages
---
[ {% capture kup %}kup{% endcapture %}{% assign dataidCategory = site.data[kup] | sort: "Last Updated" | reverse %}{% for item in dataidCategory limit:6 %}
{
"title": "{{ item.Document }}",
"category": "{{ item.LastUpdated }}",
"url": "{{ item.url }}"
#!/usr/bin/env ruby
raise 'Missing argument: Filename' if ARGV.empty?
require 'Date'
post_title = ARGV.join(' ')
post_date = Date.today.to_s
post_time = '09:00:00 -04:00'
file_path = "./_posts/#{post_date}-#{ARGV.join('-').gsub(/:/, "").downcase}.md"
function changeStyle() {
myHeading1 = {};
myHeading1[DocumentApp.Attribute.FONT_SIZE] = 24;
myHeading1[DocumentApp.Attribute.FONT_FAMILY] = "Georgia";
myHeading2 = {};
myHeading2[DocumentApp.Attribute.FONT_SIZE] = 16;
myHeading2[DocumentApp.Attribute.FONT_FAMILY] = "Verdana";
myHeading2[DocumentApp.Attribute.FOREGROUND_COLOR] = "#555555";
@kelaspajak
kelaspajak / listing google sheet file
Created February 16, 2020 08:40
list google sheet file, formatting and download as csv or json
/**
* A special function that runs when the spreadsheet is open, used to add a
* custom menu to the spreadsheet.
*/
function onOpen() {
var spreadsheet = SpreadsheetApp.getActive();
var menuItems = [
{name: 'List All', functionName: 'listAll'},
{name: 'Split', functionName: 'getSplit'},
{name: 'DeleteNilRow', functionName: 'deleteNilRow'},
@kelaspajak
kelaspajak / export sheet to json
Last active February 14, 2020 07:24
google apps script export sheet to json
/* From https://gist.github.com/IronistM/8be09ebd4c5a4a58c63b */
function exportSheetAsJSON() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var numCols = rows.getNumColumns();
var values = rows.getValues();
var output = "";