This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############################################## | |
# Install lib before using: # | |
# sudo apt install -y chromium-codecs-ffmpeg # | |
############################################## | |
OPERA_PATH=/usr/lib/x86_64-linux-gnu/opera-developer | |
FFMPEG_PATH=/snap/chromium-ffmpeg/current/chromium-ffmpeg-111306/chromium-ffmpeg/libffmpeg.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
exec_in_new_tab() { | |
xdotool key 'ctrl+shift+t'; | |
sleep 1; | |
for cmd in "$@" | |
do | |
xdotool type --delay 1 --clearmodifiers "$cmd"; | |
xdotool key 'Return'; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# List current devices before operation for convenience | |
# There must be only one device connected or operation will fail | |
adb devices | |
# Listen on TCP port | |
adb tcpip 5555 | |
# Connection may fail operation if done too early, so wait for a while | |
sleep 5; | |
# Find out local ip address (this may differ based on network card etc.) and connect via TCP/IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Prepare list of commit hashes. | |
# Adjust `since`, `grep` and other switches to your needs. | |
git log --merges --since=2018-02-01 --grep="(pull request #" --format="%H %ci" | | |
while read -a vars | |
do | |
# Checkout to given commit. | |
# Must be executed in the target repository, with no working three changes. | |
git checkout ${vars[0]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import BaseForm from './BaseForm'; | |
import QuickForm from './QuickForm'; | |
import ValidatedForm from './ValidatedForm'; | |
const ValidatedQuickForm = ValidatedForm.Validated(QuickForm.Quick(BaseForm)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {SimpleSchema} from 'meteor/aldeed:simple-schema'; | |
export const BlogPostSchema = new SimpleSchema({ | |
title: { | |
type: String, | |
}, | |
authorName: { | |
type: String, | |
optional: true, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {AutoForm} from 'uniforms-semantic'; | |
const MySimpleForm = () => ( | |
<AutoForm | |
schema={schema} | |
onSubmit={(data) => /* handle data when form is submitted */} | |
/> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Grid} from 'semantic-ui-react'; | |
import { | |
AutoForm, TextField, LongTextField, RadioField, SubmitField, ErrorsField | |
} from 'uniforms-semantic'; | |
const CustomForm = () => ( | |
<AutoForm | |
schema={BlogPostSchema} | |
onSubmit={(data) => /* you'll probably want to call some prop over here */} | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://install.meteor.com/ 2>&1 | sed -e "s/type sudo >\/dev\/null 2>&1/\ false /g" | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dburl=`meteor mongo --url $1` | |
echo "mongo dburl:" $dburl | |
IFS=':' read -a dbdata <<< "$dburl" | |
IFS='@' read -a dbdata2 <<< "${dbdata[2]}" | |
IFS='/' read -a dbdata3 <<< "${dbdata[3]}" | |
M_USER=`echo ${dbdata[1]} | sed 's/\/\///g'` | |
M_PASSWD=${dbdata2[0]} | |
M_HOST=${dbdata2[1]} |