Skip to content

Instantly share code, notes, and snippets.

View WuglyakBolgoink's full-sized avatar
🗣️
We are hiring developers in Germany with fluent german!!! pm me!

Elderov Ali WuglyakBolgoink

🗣️
We are hiring developers in Germany with fluent german!!! pm me!
View GitHub Profile
@WuglyakBolgoink
WuglyakBolgoink / linux_tipps_and_tricks.sh
Last active April 25, 2016 20:25
Linux: Tipps and Tricks in console
# Parse json file in bash:
mocha -R json | grep failures -m 1 | awk '{ print $2 }'
#export als json
#-------------| get only 1. line
#----------------------------------| get only second part of string
# PATH
@WuglyakBolgoink
WuglyakBolgoink / is_installed.sh
Created May 31, 2016 13:22 — forked from JamieMason/is_installed.sh
Check if a program exists from a bash script. Thanks to twitter.com/joshnesbitt and twitter.com/mheap for the help with detecting npm packages.
#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
@WuglyakBolgoink
WuglyakBolgoink / iconv.docker
Created June 6, 2016 14:32 — forked from tristanlins/iconv.docker
Docker PHP extension recipes
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv \
&& apt-get remove -y \
libfreetype6-dev \
&& apt-get install -y \
@WuglyakBolgoink
WuglyakBolgoink / API.md
Created June 7, 2016 13:47 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@WuglyakBolgoink
WuglyakBolgoink / app.js
Created April 10, 2018 17:38 — forked from mreigen/app.js
Goal: 1) To remove the # hash from the url. 2) Shareable on Facebook, twitter... with dynamic meta tags
//AngularJS app
.config( function myAppConfig ($locationProvider) {
$locationProvider.html5Mode(true);
...
}
@WuglyakBolgoink
WuglyakBolgoink / gulpfile.js
Created May 2, 2018 17:32 — forked from kcmr/gulpfile.js
Pushstate with browserSync (gulp)
var gulp = require('gulp'),
browserSync = require('browser-sync'),
historyApiFallback = require('connect-history-api-fallback');
gulp.task('serve', function() {
browserSync({
files: ['js/**/*.js', '*.html', 'css/**/*.css'],
server: {
baseDir: '.',
middleware: [ historyApiFallback() ]
@WuglyakBolgoink
WuglyakBolgoink / app-exit.js
Created June 7, 2018 11:04 — forked from kuldipem/app-exit.js
Cordova/PhoneGap exit app after twice press back button with toast ( plugin required https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin )
var lastTimeBackPress=0;
var timePeriodToExit=2000;
function onBackKeyDown(e){
e.preventDefault();
e.stopPropagation();
if(new Date().getTime() - lastTimeBackPress < timePeriodToExit){
navigator.app.exitApp();
}else{
window.plugins.toast.showWithOptions(
@WuglyakBolgoink
WuglyakBolgoink / git-clearHistory
Created March 27, 2019 20:12 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@WuglyakBolgoink
WuglyakBolgoink / cleanNodeModules.js
Created April 3, 2019 16:58
Clean node_modules to minimize CI Caching/Artifacts
/**
* TODO:
* 1) remove all ".idea" folders!
* 2) remove all "coverage" folders!
* 3) remove all empty folders!
* 4) remove all "examples" folders!
* 5) remove all "example" folders!
* 6) remove all "test" folders!
* 7) remove all "tests" folders!
* 8) remove all "*.md" files extly with names!
@WuglyakBolgoink
WuglyakBolgoink / .bash_aliases
Created October 3, 2019 11:53
Cordova aliases to upgrade platform and plugins
# -----------------------------------------
# Alias "coupplat" = cordova upgrade platfrom
# -----------------------------------------
# Usage: coupplat <platform_name> <version>
# $ coupplat android 8.1.1
# $ coupplat ios 4.0.0
#
# Todo's:
# - add check if this is cordova project/folder
alias coupplat='function _cordovaUpgradePlatform(){ echo "Platform: $1"; echo "Version: $2"; pwd; cordova platform rm "cordova-$1" --save; cordova platform add "cordova-$1@$2" --save;};_cordovaUpgradePlatform'