Skip to content

Instantly share code, notes, and snippets.

View flyudvik's full-sized avatar

Malik Sulaimanov flyudvik

  • ReTech Labs
  • Bishkek/Kyrgyzstan
  • 22:50 (UTC +06:00)
View GitHub Profile
@flyudvik
flyudvik / snippet.sh
Last active September 24, 2018 06:27
Load .env file
function loadenv() {
cat .env | while read LINE; do export $LINE || true; done
}
@flyudvik
flyudvik / Postman.desktop
Last active May 3, 2018 11:15 — forked from aviskase/Postman.desktop
Install Postman. `bash install-postman.sh`
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@flyudvik
flyudvik / pickled_requests_session.py
Created April 25, 2018 09:59
Pickle and unpickle session. Good to save the request sessions for cli app without making authentication
import requests, requests.utils, pickle
session = requests.session()
# Make some calls
# save session
with open('somefile', 'w') as f:
pickle.dump(session, f)
# sessiong restore
@flyudvik
flyudvik / update_jenkins.sh
Last active September 24, 2018 06:07
Update jenkins through jenkins.war file. Usage: update_jenkins.sh http://updates.jenkins-ci.org/download/war/2.107.2/jenkins.war
#!/usr/bin/env bash
echo "Backing up the jenkins.war"
sudo cp /usr/share/jenkins/jenkins.war /usr/share/jenkins/jenkins.war.backup_$(date +'%m_%dT%H_%M_%S')
echo !!
echo "Downloading the new version"
sudo wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war -O /usr/share/jenkins/jenkins.war
sudo systemctl stop jenkins
# Open CV 3.3.1 with python ${VERSION}
PYTHON_EXECUTABLE_PATH=$1
if [-z "$PYTHON_EXECUTABLE"] then;
echo "Using PATH default python $(command -v python)"
PYTHON_EXECUTABLE=$(command -v python)
fi
set -ex
@flyudvik
flyudvik / gist:46cbd62c724f2cd9ec7eb53e785e6ae0
Last active April 16, 2018 09:57 — 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:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flyudvik
flyudvik / tmux.md
Created April 15, 2018 17:58 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@flyudvik
flyudvik / README.md
Created April 15, 2018 17:56 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@flyudvik
flyudvik / useful_pandas_snippets.py
Last active April 15, 2018 17:51 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets #pandas
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!