This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useSSH=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GitHook { | |
public static void main(String[] args) throws IOException, GitAPIException { | |
// collect the repository location <1> | |
final Path currentPath = new File("").toPath().toAbsolutePath(); | |
final String parentFolderName = currentPath.getParent().getName(currentPath.getParent().getNameCount() - 1).toString(); | |
// ignoring system space <2> | |
if (parentFolderName.equalsIgnoreCase("system")) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.acme.kogito.model; | |
public class Person { | |
private String name; | |
private int age; | |
private boolean adult; | |
public String getName() { | |
return name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir myrepo | |
$ cd myrepo | |
$ git init | |
Initialized empty Git repository in /Users/porcelli/blog/myrepo/.git/ | |
$ touch file1.txt | |
$ git add . | |
$ git commit -m "first commit" | |
[master (root-commit) 0fa1a4a] first commit | |
1 file changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 file1.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go to here https://www.linkedin.com/feed/following/?filterType=connection | |
// open the chrome dev tools console | |
// paste the following | |
// go grab a cup of tea | |
// get rid of all life coach from linkedin | |
var buttons = $('button'), interval = setInterval(function() { | |
var btn = $('.is-following'); | |
console.log('Clicking:', btn); | |
btn.click(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.example.http.authenticate; | |
import java.io.*; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.HashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.eclipse.jgit.api.CloneCommand; | |
import org.eclipse.jgit.api.errors.InvalidRemoteException; | |
import org.eclipse.jgit.lib.Repository; | |
import org.eclipse.jgit.lib.StoredConfig; | |
import org.eclipse.jgit.transport.RemoteConfig; | |
import org.eclipse.jgit.transport.URIish; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URISyntaxException; |