Skip to content

Instantly share code, notes, and snippets.

View himanshu4141's full-sized avatar
:bowtie:

Himanshu yadav himanshu4141

:bowtie:
View GitHub Profile
List all exited containers

docker ps -aq -f status=exited

Remove stopped containers

docker ps -aq --no-trunc -f status=exited | xargs docker rm

Remove dangling/untagged images

docker images -q --filter dangling=true | xargs docker rmi

Moving to Dublin

Employment Permit

There are two types of employment permit. Most likely you'll need critical skills permit.

  • General :- Need Labor Test if not programmer and salary < 60K, partner can join only after one year.
  • Critical Skills :- programmer or salary > 60K, No labor test required and partner can join immediately.

Visa

  • First visa issued is always single entry, you can enter once and then you'll have to Register at local GNIB office and apply for reentry visa within 3 months.

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore

Keybase proof

I hereby claim:

  • I am himanshu4141 on github.
  • I am hyadav (https://keybase.io/hyadav) on keybase.
  • I have a public key ASCvhqLmRpCl2TW4uIi-giMZaWEgIcQup_qVcKJ_1Gs_4Ao

To claim this, I am signing this object:

@himanshu4141
himanshu4141 / linuxcheatsheet.md
Last active July 30, 2018 14:59
Linux CheatSheet

Checking logs on multiple remote server

for host in hd1pxx2{1..6}lx; do echo $host; ssh $host "grep \"FATAL\" /home/bmadmin/bmsPRD2012/log/*_website_activity.log | wc -l"; done

How do I find all files containing specific text on Linux?

grep -rnw '/path/to/somewhere/' -e 'pattern'
-r or -R is recursive,
@himanshu4141
himanshu4141 / Mac SSH Autocomplete
Created March 8, 2017 16:06 — forked from agaro1121/Mac SSH Autocomplete
Add auto complete to your ssh, put into your .bash_profile
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
#!/bin/sh
sbt test
#!/bin/sh
# Files (not deleted) in the index
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | cut -c3-)
if [ "$files" != "" ]
then
for f in $files
do
# Only examine known text files
if [[ "$f" =~ [.](scala|java|conf|json|html|js|properties|xml|yml|md|txt)$ ]]

ScalaDays NYC (2016)

KeyNote:
  • Scalajs is matured enough to be used for Production systems.
  • Macros, procedual syntax and early initializers are gone.
  • 2.12 introduces effect system and meta programming.
  • Dotty the new compiler - faster than current scala.
  • Scala will be forked into multiple projects - core, platform etc etc in 2.13.
  • Scala Native got opensourced - very early to adopt but something cool to work for in near future.
#!/bin/sh
#
# Setting up my mac for development.
#
#Change default screenshots directory
mkdir ~/Desktop/screenshots
defaults write com.apple.screencapture location ~/Desktop/screenshots && killall SystemUIServer
#install brew and brew cask
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"