Skip to content

Instantly share code, notes, and snippets.

View lewkoo's full-sized avatar

Levko Ivanchuk lewkoo

View GitHub Profile
@lewkoo
lewkoo / shader.vert
Created February 27, 2014 03:20
Vertex shader for Android simple shader example
attribute vec4 position;
uniform mat4 modelViewProjectionMatrix;
void main(){
gl_Position = modelViewProjectionMatrix * position;
}
@lewkoo
lewkoo / shader.frag
Created February 27, 2014 03:20
Fragment shader for a very simple Android shader example
precision highp float;
void main()
{
// gl_FragCoord contains the window relative coordinate for the fragment.
// we use gl_FragCoord.x position to control the red color value.
// we use gl_FragCoord.y position to control the green color value.
// please note that all r, g, b, a values are between 0 and 1.
@lewkoo
lewkoo / add_all_untracked_to_gitignore.sh
Created December 10, 2014 07:50
Add all untracked files to .gitignore
git status -s | grep -e "^\?\?" | cut -c 4- >> .gitignore
@lewkoo
lewkoo / remove_remote_tags.sh
Last active July 6, 2020 13:05
Removes all tags on a remote.
#!/bin/bash
tag_names=""
git ls-remote --tags --refs ci |
{
while read old_t; do
tag_names+=":refs/tags/${old_t##*refs/tags/} "
done
git push origin $tag_names
}
#!/usr/bin/env bash
function find_in_list()
{
[[ "$2" == *"$1"* ]] && return 0 || return 1;
}
function add_path_to_rules()
{
# The idea was to pass an extra path
@lewkoo
lewkoo / rename_tags.sh
Created July 10, 2020 07:09
Batch rename all tags inside a Git repo
git tag -l | while read old_t; do
new_t="${old_t//v/}"
new_t="${new_t//-alpha/}"
echo $new_t
git tag $new_t $old_t
git push --tags
git tag -d $old_t
git push origin :refs/tags/$old_t
done
@lewkoo
lewkoo / remove_remote_tags.sh
Created July 10, 2020 07:10
Remove tags from remote repo that match a certain pattern
#!/bin/bash
tag_names=""
git ls-remote --tags --refs origin |
{
while read old_t; do
tag_names+=":refs/tags/${old_t##*refs/tags/} "
done
git push origin $tag_names
}

Keybase proof

I hereby claim:

  • I am lewkoo on github.
  • I am lewkoo (https://keybase.io/lewkoo) on keybase.
  • I have a public key whose fingerprint is FB21 D86F D40C BE2B 42AB 5BEE FF7E 2F5B 2137 632F

To claim this, I am signing this object:

@lewkoo
lewkoo / expand-intents.js
Created November 18, 2021 08:28
Expand all follow-up intents on Dialogflow Web UI
document.querySelectorAll('[class^="md-icon-button exist-follow-up ico-item md-button md-ink-ripple"]').forEach(element => {element.click();})
@lewkoo
lewkoo / Coverage Badges
Created November 30, 2021 10:47
Coverage Badges
Coverage Badges