Skip to content

Instantly share code, notes, and snippets.

@andreyserdjuk
andreyserdjuk / docker_static_ip.sh
Last active April 9, 2022 19:15
docker static ip
# in case of conflict with local nginx:
# make sure in all *.confs (
# also in default and example to avoid error like
# 'nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)'
# )
# set for instance "listen 127.0.0.1:80" instead of "listen *:80"
# docker & network settings
DOCKER_IMAGE_NAME="maxexcloo/nginx-php" # build of nginx-php - for example
DOCKER_CONTAINERS_NAME="nginx_bridged" # our container's name
@sundararajana
sundararajana / doomsday
Created October 26, 2014 11:03
தேதி தெரிந்தால் அந்நாளின் கிழமை அறிவது எப்படி?
இந்தியாவின் சுதந்திர தினம் என்ன? அது சுலபம்: 15 ஆகஸ்டு 1947. அந்நாளின் கிழமை என்ன?
வெள்ளி. தேதி தெரிந்தால் அந்நாளின் கிழமை அறிவது எப்படி?
* ஒரு வருடத்தின் பிப்ரவரி கடைசி நாளை "டூம்ஸ்டே" (doomsday) எனக் கொள்வோம்.
அதாவது பிப்ரவரி 28 அல்லது 29 (லீப் வருடமானால்). "டூம்ஸ்டே"-யின் கிழமை தெரிந்தால்
வருடத்தின் எந்த நாளின் கிழமையையும் நாம் கணக்கிடலாம்.
* டூம்ஸ்டே அன்று என்ன கிழமையோ அதே கிழமை ஏப்ரல் 4, ஜுன் 6, ஆகஸ்டு 8,
அக்டோபர் 10, டிஸம்பர் 12 ஆகிய நாட்களிலும் வரும். எ.கா: 2014-ன் பிப்ரவரி 28.
அதாவது டூம்ஸ்டே அன்று வெள்ளிக்கிழமை. 2014 டிஸம்பர் 12-ம் தேதி வெள்ளிக்கிழமை!
@sangeeths
sangeeths / github-to-bitbucket
Created March 10, 2014 15:24
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@wacko
wacko / gist:5577187
Last active January 6, 2024 07:31
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0