Skip to content

Instantly share code, notes, and snippets.

@sim2github
sim2github / dl-cloud-mail-ru.sh
Created January 9, 2020 07:34 — forked from cronfy/dl-cloud-mail-ru.sh
Download file from cloud.mail.ru from linux console with bash script
#!/usr/bin/env bash
#
# ВАЖНО. mail.ru время от времени меняет внутрянку, не очень сильно, но требуется адаптация скрипта.
# Если скрипт не работает, просьба разместить патч в комментариях или сделать работающий форк.
# 2018-06-18 updated: mail.ru changed internals
# 2017-09-22 original idea: https://novall.net/itnews/bash-skript-dlya-skachivaniya-fajlov-s-mail-ru-cherez-konsol-linux.html
URL="$1"
@sim2github
sim2github / get_github_latest_release.sh
Created January 15, 2019 05:21
Download latest release with curl example
RUN export LATEST_PROTO_VERSION=$(curl -sL https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep '"tag_name":' | cut -d: -f2 | cut -c4-8) && \
curl -sL https://github.com/protocolbuffers/protobuf/releases/download/v${LATEST_PROTO_VERSION}/protoc-${LATEST_PROTO_VERSION}-linux-x86_64.zip -o proto.zip && \
@sim2github
sim2github / ext.sh
Last active March 27, 2020 13:04
VSCode
#!/bin/sh
# code --list-extensions | xargs -L 1 echo code --install-extension >> etx.sh
code --install-extension alexdima.copy-relative-path
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension brandonjmatthews.one-dark-dark-plus
code --install-extension christian-kohler.npm-intellisense
code --install-extension dbaeumer.vscode-eslint
code --install-extension dracula-theme.theme-dracula
code --install-extension eamodio.gitlens
@sim2github
sim2github / gist:16c1a6542d7cce49e49db219f6f75079
Created May 26, 2018 07:37
Vimium dvorak русская раскладка
map ц showHelp
map с scrollDown
map м scrollUp
map о scrollLeft
map х scrollRight
map гг scrollToTop
map Г scrollToBottom
map .О scrollToLeft
map .Х scrollToRight
map <с-в> scrollDown
@sim2github
sim2github / make_vim8.sh
Created April 20, 2018 08:28
Vim Ultisnips support on ide.c9.io
cd $HOME
git clone https://github.com/vim/vim
cd vim
make distclean
./configure –enable-multibyte \
--enable-fontset \
--enable-xim \
--enable-gui=auto \
--enable-luainterp=dynamic \
--enable-pythoninterp=yes \
@sim2github
sim2github / gulpfile.js
Created November 20, 2017 03:55 — forked from ahmadawais/gulpfile.js
Gulp: Images minificaiton task
/**
* Images
*
* Look at src/images, optimize the images and send them to the appropriate place
*/
gulp.task('images', function() {
// Add the newer pipe to pass through newer images only
return gulp.src(['./assets/img/raw/**/*.{png,jpg,gif}'])
.pipe(newer('./assets/img/'))
@sim2github
sim2github / .commonrc.zsh
Last active July 29, 2019 16:57
$HOME zsh configs
# ~/.commonrc.zsh
# Vi mode
bindkey -v
# Use vim cli mode
bindkey '^P' up-history
bindkey '^N' down-history
# backspace and ^h working even after
Download using android tool from the sdk
Instead of running the android sdk manager with a GUI, you also have an option to run in headless mode. You just need to specify -u flag.
To list packages available for installation or upgrade:
$ cd android-sdk-linux
$ ./tools/android list sdk --all
Refresh Sources:
(...)
@sim2github
sim2github / gist:c26ea72ed41596f283db
Last active May 6, 2019 16:12
Ace with emmet bookmarklet.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Droid+Sans+Mono);
body {
margin:0;
@sim2github
sim2github / gist:337cf2dccb8cfc39bc1a
Created April 12, 2015 04:41
bash_profile - msysgit - WPN-XM
# Some good standards, which are not used if the user
# creates his/her own .bashrc/.bash_profile
export PATH="$PATH:/c/cerver/bin/nodejs/:/c/server/bin/nodejs/node_modules/npm/:/c/server/bin/ruby/bin/"
# --show-control-chars: help showing Korean or accented characters
alias ls='ls -F --color=auto --show-control-chars'
alias ll='ls -l'
alias www='cd /c/server/www/'
alias st='cmd //c /d/#portable/Total\ Commander/Plugins/exe/SublimeText3/subl.exe'