(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"
cd /develop/myrepo
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
#!/usr/bin/perl | |
#fetch Gravatars | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use Digest::MD5 qw(md5_hex); | |
my $size = 90; |
public class MyTest { | |
@Rule | |
public MethodRule screenshot = new ScreenshotOnFailureRule(); | |
@Test | |
public void myTest() { ... } | |
... | |
} |
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |
#--------------------------------------------------------------------- | |
# | |
# Parse the response from Sonatype Nexus in order to determine the | |
# correct URI for the most recent snapshot of an artifact. | |
# | |
# Usage: | |
# ruby get_latest_snapshot.rb \ | |
# -n http://localhost:8080/nexus \ | |
# -g uk.co.scattercode \ | |
# -a my-artifact \ |
# create directory | |
create directory dmpdir as 'c:/temp'; | |
select directory_name,directory_path from dba_directories; | |
# expdp owner | |
create user scott identified by tiger; | |
grant connect, resource to scott; | |
... | |
grant read, write on directory dmpdir to scott; | |
expdp scott/tiger@xe directory=dmpdir dumpfile=scott.dmp logfile=expdp.log |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter(user => user.followers > 1000)