An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
git checkout -- Gemfile.lock |
If you got following error during dnssd installation | |
checking for dns_sd.h... no | |
unable to find dnssd header | |
*** extconf.rb failed *** | |
then you have to install few libraries: | |
sudo aptitude install libavahi-compat-libdnssd-dev |
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
#!/bin/bash | |
# Delete all containers |
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version | |
Go to menu Help > Enter License. | |
----- BEGIN LICENSE ----- | |
J2TeaM | |
2 User License | |
EA7E-940282 | |
45CB0D8F 09100037 7D1056EB A1DDC1A2 |
web: sh -c 'cd ./directory/ && exec appname' |
<?php | |
###################################### | |
# | |
# Author: Aleksandar Popovic | |
# | |
# A recursive function to traverse a multi-dimensional array | |
# where the dimensions are not known | |
# | |
####################################### |
$array = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ | |
"1" => [ | |
"key" => "value" | |
] | |
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]; | |
$array_obj = new RecursiveIteratorIterator(new RecursiveArrayIterator($array)); | |
foreach($array_obj as $key => $value) { | |
echo $value; | |
} |
<?php | |
function finder($array, $index) { | |
$arrayIt = new RecursiveArrayIterator($array); | |
$it = new RecursiveIteratorIterator( | |
$arrayIt, RecursiveIteratorIterator::SELF_FIRST | |
); | |
foreach ($it as $key => $value) { | |
if ($key == $index) { | |
return $value; |