Skip to content

Instantly share code, notes, and snippets.

View kazlauskis's full-sized avatar

Karolis Kazlauskis kazlauskis

View GitHub Profile
@luiz-chagas
luiz-chagas / AsyncStorageMigration.java
Created June 9, 2020 20:09
Migrates AsyncStorage from Expo managed onto ReactNative applications (such as Expo bare)
package com.your.company;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.channels.FileChannel;
import android.content.Context;
@JoshK2
JoshK2 / import-all.js
Last active February 24, 2022 10:07
Import all components from a collection at bit.dev
//IMPORTANT - install thie before: npm i child-process-promise --save-dev
/*
put this in your package.json script:
"import-all": "node import-all.js"
npm run import-all <user>.<collection> amount
*/
const exec = require('child-process-promise').exec;
const args = process.argv;
@Merott
Merott / tailwind-colors-as-css-variables.md
Last active April 26, 2024 11:06
Expose Tailwind colors as CSS custom properties (variables)

This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.

There are a couple of main reasons this is helpful:

  • You can reference all of Tailwind's colors—including any custom ones you define—from handwritten CSS code.
  • You can define all of your colors within the Tailwind configuration, and access the final values programmatically, which isn't possible if you did it the other way around: referencing custom CSS variables (defined in CSS code) from your Tailwind config.

See the Tailwind Plugins for more info on plugins.

@tyzbit
tyzbit / zoom-mute-status.scpt
Created September 14, 2019 17:11
Get Zoom Mute/Unmute Status
property btnTitle : "Mute audio"
tell application "System Events" to tell application process "zoom.us"
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
do shell script "echo Unmuted"
else
do shell script "echo Muted"
end if
end tell
@ziadoz
ziadoz / install.sh
Last active April 20, 2024 10:18
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@omegahm
omegahm / create_labels.sh
Created April 7, 2015 19:00
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@ejh
ejh / leaflet-button-control.js
Created June 15, 2012 08:11
Leaflet control button example
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},