Skip to content

Instantly share code, notes, and snippets.

View sonnylazuardi's full-sized avatar
🎯
Focusing

Sonny Lazuardi sonnylazuardi

🎯
Focusing
View GitHub Profile
type ArgFreeEventType =
| "selectionchange"
| "currentpagechange"
| "close"
| "timerstart"
| "timerstop"
| "timerpause"
| "timerresume"
| "timeradjust"
| "timerdone"
@sonnylazuardi
sonnylazuardi / setup.sh
Created December 30, 2021 10:47 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@sonnylazuardi
sonnylazuardi / CounterReact.jsx
Created August 13, 2021 06:52
Astro React Vue. Global State Management: Zustand
import React from "react";
import { useStore } from "./store";
export default function CounterReact({ demo }) {
const state = useStore((state) => state);
let add = () => {
state.inc();
};
@sonnylazuardi
sonnylazuardi / code.ts
Created June 11, 2021 04:27
Resizable Figma Plugin Window
figma.showUI(__html__,{width: 250, height: 250});
// restore previous size
figma.clientStorage.getAsync('size').then(size => {
if(size) figma.ui.resize(size.w,size.h);
}).catch(err=>{});
figma.ui.onmessage = msg => {
switch (msg.type) {
case "resize":
figma.ui.resize(msg.size.w,msg.size.h);
figma.clientStorage.setAsync('size', msg.size).catch(err=>{});// save size
const client = new ApolloClient({
networkInterface: createNetworkInterface({
uri: "https://n84vv4q37.lp.gql.zone/graphql"
})
});
// Define your models and their properties
const PassageSchema = {
name: "Passage",
primaryKey: "id",
@sonnylazuardi
sonnylazuardi / App.js
Created July 6, 2017 14:19
React Native Starter
import React from "react";
import {
StyleSheet,
Text,
View,
TouchableHighlight,
TextInput,
} from "react-native";
import { StackNavigator } from 'react-navigation';
import ScreenA from './src/screens/ScreenA';
@sonnylazuardi
sonnylazuardi / keybase.md
Created January 6, 2017 06:25
keybase io

Keybase proof

I hereby claim:

  • I am sonnylazuardi on github.
  • I am sonnylazuardi (https://keybase.io/sonnylazuardi) on keybase.
  • I have a public key whose fingerprint is BD50 DFEA 4193 24A8 B51A C08B 6761 8CD0 A54F 1E6F

To claim this, I am signing this object:

@sonnylazuardi
sonnylazuardi / sketch-never-ending.md
Last active January 6, 2022 10:03
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@sonnylazuardi
sonnylazuardi / fileName
Created January 8, 2016 01:52
created with LaravelDBDesigner
[{"name":"Bears","color":"Blue","position":{"x":177,"y":85},"modelclass":"Bear","increment":false,"timestamp":false,"softdelete":false,"column":[{"colid":"c217","name":"id","type":"increments","length":"0","order":0,"defaultvalue":"","enumvalue":""},{"colid":"c218","name":"name","type":"string","length":"200","order":1,"defaultvalue":"","enumvalue":""},{"colid":"c219","name":"danger_level","type":"string","length":"200","order":2,"defaultvalue":"","enumvalue":""}],"relation":[{"extramethods":"","foreignkeys":"","name":"fish","relatedmodel":"Fish","relationtype":"hasOne","usenamespace":""},{"extramethods":"","foreignkeys":"","name":"trees","relatedmodel":"Trees","relationtype":"hasMany","usenamespace":""},{"extramethods":"","foreignkeys":"bear_id, picnic_id","name":"picnics","relatedmodel":"Picnics","relationtype":"belongsToMany","usenamespace":""}],"seeding":[]},{"name":"Fish","color":"Yellow","position":{"x":1063,"y":14},"modelclass":"Fish","increment":false,"timestamp":false,"softdelete":false,"column":[{"c