Skip to content

Instantly share code, notes, and snippets.

@olzhas23
olzhas23 / springtestone_.gitignore
Created September 26, 2019 18:00
PalindromeTest
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
@olzhas23
olzhas23 / mongobackup.py
Created May 3, 2018 16:18 — forked from jasonwyatt/mongobackup.py
Python script to back up MongoDB databases given a MongoDB URL and output directory path. If no Mongo URL is given, it will default to checking for a MONGOLAB_URI config variable with `heroku config`.
#!/usr/bin/env python
import os
import argparse
import logging
import datetime
import urlparse
import subprocess
logging.basicConfig(level=logging.INFO)
@olzhas23
olzhas23 / Redis SCAN by "regex"
Created April 26, 2018 19:27 — forked from itamarhaber/Redis SCAN by "regex"
Regex-like key name pattern matching in Redis
foo@bar:~$ redis-cli
127.0.0.1:6379> dbsize
(integer) 0
127.0.0.1:6379> set user:1 1
OK
127.0.0.1:6379> set use:the:force luke
OK
127.0.0.1:6379> set non:user a
OK
foo@bar:~$ redis-cli --eval scanregex.lua , "^user"
# adding and committing
git add -A # stages All
git add . # stages new and modified, without deleted
git add -u # stages modified and deleted, without new
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed.
git commit --amend --no-edit # Do so without having to edit the commit message.
# remotes - pushing, pulling, and tracking
git fetch # gets remote objects and refs. Needed if new branches were added on the remote.
git remote -v # Lists all remotes (verbose)