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
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out private.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key private.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp private.key private.key.old | |
openssl rsa -in private.key.old -out private.key |
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
[user] | |
name = jeaye | |
email = <redacted> | |
[color] | |
all = true | |
ui = true | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] |
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
#!/bin/bash | |
# | |
# Script to remove GPG key from git-crypt | |
# | |
# It will re-initialize git-crypt for the repository and re-add all keys except | |
# the one requested for removal. | |
# | |
# Note: You still need to change all your secrets to fully protect yourself. | |
# Removing a user will prevent them from reading future changes but they will | |
# still have a copy of the data up to the point of their removal. |
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
secretfile filter=git-crypt diff=git-crypt | |
*.key filter=git-crypt diff=git-crypt | |
secretdir/** filter=git-crypt diff=git-crypt |
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
This works however: | |
#### build.gradle | |
```gradle | |
buildscript { | |
// Repository Configuration | |
ext.repos = { | |
mavenCentral() | |
maven { url 'https://repo.spring.io/milestone' } |
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
fun flatten(numbers: Array<Any>): ArrayList<Int> { | |
val flattenReturn = arrayListOf<Int>() | |
numbers.forEach { it -> | |
if (it is Int) { | |
flattenReturn.add(it) | |
} else { | |
val temp = flatten(it as Array<Any>) | |
flattenReturn.addAll(temp) | |
} | |
} |
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
#Organize files by date: | |
for x in `find . -type f -name "*.*"` ; do | |
year=$(date -r "$x" +%Y) | |
monthyear=$(date -r "$x" +%m-%Y) | |
day=$(date -r "$x" +%Y-%m-%d) | |
foldername="$year/$monthyear/" | |
mkdir -p "$foldername" | |
mv -- "$x" "$foldername" | |
echo "Moving file $x to $foldername" #>> logs.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
@WebServlet(name = "MyWebHook", value = "/WebHook") | |
public class MyWebServlet extends HttpServlet { | |
private MyBean byBean | |
= SpringUtils.INSTANCE.ctx(this, true).getBean(MyBean.class); | |
public MyWebServlet() { |
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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
public class EasyPNRExample { | |
/** | |
* https://www.easypnr.com/webservice | |
* @param args |
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
<span style="left: -38px; margin-right: -38px; position: relative;" class="button btn">teste</span> |
NewerOlder