Skip to content

Instantly share code, notes, and snippets.

Avatar

Karolis Kazlauskis kazlauskis

View GitHub Profile
@luiz-chagas
luiz-chagas / AsyncStorageMigration.java
Created Jun 9, 2020
Migrates AsyncStorage from Expo managed onto ReactNative applications (such as Expo bare)
View AsyncStorageMigration.java
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 Feb 24, 2022
Import all components from a collection at bit.dev
View import-all.js
//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;
@tyzbit
tyzbit / zoom-mute-status.scpt
Created Sep 14, 2019
Get Zoom Mute/Unmute Status
View zoom-mute-status.scpt
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 Sep 26, 2022
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
View install.sh
#!/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 Apr 7, 2015
Create Gtihub labels from Bash
View create_labels.sh
#!/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 Jun 15, 2012
Leaflet control button example
View leaflet-button-control.js
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},