Skip to content

Instantly share code, notes, and snippets.

View kardolus's full-sized avatar
🔥
crushing it

Guillermo Kardolus kardolus

🔥
crushing it
View GitHub Profile
setInterval(() => {
[...document.getElementsByClassName("succeeded")].forEach((e) => {
e.style.background = '#328856';
});
[...document.getElementsByClassName("inner")].forEach((e) => {
e.style.whiteSpace = 'initial';
e.style.fontSize = '40px';
});
}, 1000)
@kardolus
kardolus / order.tml
Last active November 14, 2018 22:22
toml_parsing
[groups]
labels = ["nodejs"]
buildpacks = [
{ id = "org.cloudfoundry.buildpacks.nodejs", version = '0.0.1' },
{ id = "org.cloudfoundry.buildpacks.npm", version = '0.0.1' }
]
public ByteString encrypt(ByteString input){
System.out.println("Encrypting...");
try {
Object lunaSlotManager = Class.forName("com.safenetinc.luna.LunaSlotManager").getDeclaredMethod("getInstance").invoke(null);
lunaSlotManager.getClass().getMethod("login", String.class, String.class).invoke(lunaSlotManager, PARITION_NAME, PARITION_PASSWORD);
Provider provider = (Provider) Class.forName("com.safenetinc.luna.provider.LunaProvider").newInstance();
Security.addProvider(provider);
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding", provider);
if [ "$#" -ne 2 ]; then
echo "Usage: bump_version <version_number> <message>"
exit 1
fi
VERSION=$1
MESSAGE=$2
# Update package.json
sed -i '' "s/\"version\": \"[[:digit:]]*.[[:digit:]]*.[[:digit:]]*\"/\"version\": \"${VERSION}\"/g" package.json
if [ -z "$1" ]
then
echo "Usage: create_credentials.sh <number_of_credentials>"
exit 1
fi
for i in `seq 1 $1`;
do
name=$(openssl rand -base64 32 | tr -d /=+ | cut -c -16)
credhub generate -t password -n $name
@kardolus
kardolus / bst.java
Created September 18, 2017 12:21
BST
import java.io.*;
import java.util.*;
class Solution {
public static void main(String... args){
System.out.println("Coding a Binary Search Tree");
int[] original = {100, 113, 110, 85, 105, 102, 86, 63, 81, 101, 94, 106,
101, 79, 94, 90, 97};
@kardolus
kardolus / Sorting Algorithms
Last active September 18, 2017 22:32
Sorting in Java
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
int[] original = {100, 113, 110, 85, 105, 102, 86, 63, 81, 101, 94, 106,
101, 79, 94, 90, 97};
int[] input = null;
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
Test test = new Test();
test.runTests();
}
}
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
Test test = new Test();
test.runTests();
}
}