Skip to content

Instantly share code, notes, and snippets.

View andreystarkov's full-sized avatar
:electron:
<3

Andrei Starcow andreystarkov

:electron:
<3
View GitHub Profile
const expr = 'Papayas';
// old way
switch (expr) {
case 'Oranges':
console.log('Oranges are $0.59 a pound.');
break;
case 'Apples':
console.log('Apples are $0.32 a pound.');
break;
@andreystarkov
andreystarkov / README.md
Created December 14, 2020 15:11 — forked from keiya/README.md
How to broadcast to Icecast2 by using ffmpeg (FLAC,Opus,Vorbis,AAC,MP3/Windows, Mac)

FFMpeg to Icecast2 Streaming Samples

Examples usage of various codecs with FFMpeg.

Samples

  • flac.sh : An Icecast Source Client
    • for Windows (Cygwin is required)
    • and macOS (brew install ffmpeg)
  • another_examples.sh : Samples
  • FFMpeg can push to Icecast2 in various formats: Opus/Vorbis/AAC/MP3
@andreystarkov
andreystarkov / eos-faucet
Created April 10, 2019 02:55 — forked from vchengsong/eos-faucet
eos testnet faucet
package main
import(
"github.com/gin-gonic/gin"
//"net/http"
"github.com/eoscanada/eos-go"
token "github.com/eoscanada/eos-go/token"
"time"
)
@andreystarkov
andreystarkov / gist:78e046222ed8256c2ee22f0529b0d9c3
Created December 22, 2018 00:37 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@andreystarkov
andreystarkov / gist:7098a8a8468d9a19edfd688fa115885b
Created July 23, 2018 13:41 — forked from devknoll/gist:8b274f1c5d05230bfade
Basic GraphQL example using the GitHub API
import { graphql, GraphQLString, GraphQLInt } from 'graphql';
import { objectType, enumType, schemaFrom, listOf } from 'graphql-schema';
import request from 'promisingagent';
const repositorySortEnum = enumType('RepositorySort')
.value('CREATED', 'created')
.value('UPDATED', 'updated')
.value('PUSHED', 'pushed')
.value('FULL_NAME', 'full_name')
.end();
@andreystarkov
andreystarkov / Makefile
Created May 10, 2018 15:08 — forked from h4cc/Makefile
Ubuntu 18.04 Bionic Beaver - Basic packages i usually install
#
# Ubuntu 18.04 (Bionic Beaver)
#
# Basic packages i usually install.
#
# Author: Julius Beckmann <[email protected]>
#
# Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e
# Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b
@andreystarkov
andreystarkov / .bashrc
Created January 11, 2017 08:18 — forked from justintv/.bashrc
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
@andreystarkov
andreystarkov / .bashrc
Created January 11, 2017 08:18 — forked from henrik/.bashrc
Git branch and dirty state in Bash prompt.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
@andreystarkov
andreystarkov / .git-prompt.sh
Created January 11, 2017 08:17 — forked from nbrew/.git-prompt.sh
My latest bash prompt customization. Colored Git bash prompt.
#!/bin/bash
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# If you don't already have git-completion installed:
#
# cd ~/
# curl -OL https://github.com/git/git/raw/master/contrib/completion/git-completion.bash
# mv ~/git.completion.bash ~/.git-completion.bash
@andreystarkov
andreystarkov / bash_prompt.sh
Created January 11, 2017 08:07 — forked from romanlevin/bash_prompt.sh
Set color bash prompt according to active pyenv, git branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.