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
############################## | |
## Java | |
############################## | |
.mtj.tmp/ | |
*.class | |
*.jar | |
*.war | |
*.ear | |
*.nar | |
hs_err_pid* |
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
resource "aws_organizations_policy" "plan_1_policy" { | |
name = "dedunu-info-backup-plan-1-policy" | |
type = "BACKUP_POLICY" | |
content = jsonencode(local.plan1) | |
} | |
resource "aws_organizations_policy_attachment" "plan_1_policy_attachment" { | |
policy_id = aws_organizations_policy.plan_1_policy.id | |
target_id = "<account-id>" |
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 SwapInteger{ | |
public static void main(String args[]){ | |
int a = 5; | |
int b = 10; | |
System.out.println("Before swapping."); | |
System.out.println("a = " + a); | |
System.out.println("b = " + b); |
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.dedunu.alfresco; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.alfresco.model.ContentModel; | |
import org.alfresco.service.cmr.repository.ChildAssociationRef; | |
import org.alfresco.service.cmr.repository.ContentData; | |
import org.alfresco.service.cmr.repository.NodeRef; |
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
Vagrant.configure("2") do |config| | |
config.vm.define "master" do |master| | |
master.vm.box = "ubuntu/trusty64" | |
master.vm.hostname = "master.local" | |
master.vm.network "private_network", ip: "192.168.2.2" | |
end | |
config.vm.define "slave1" do |slave1| | |
slave1.vm.box = "ubuntu/trusty64" | |
slave1.vm.network :private_network, ip: "192.168.2.3" |
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 script creates a PrivateBin using Python 3. | |
Code is based on https://github.com/r4sas/PBinCLI repository. | |
Thanks a lot @r4sas! | |
Below modules should be installed in the environment. | |
requests | |
base58 | |
pycryptodome | |
""" |
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
"""RDS-Unused AWS Lambda Function | |
It will go through the REGION's RDS instances and check on CloudWatch for the unused | |
instances and will stop them. | |
""" | |
import json | |
from datetime import datetime, timedelta | |
from multiprocessing import Process, Pipe | |
import boto3 |
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 | |
printf 'a\na\nb\nc\nd\nd' > file1 | |
printf 'b\nd' > file2 | |
echo 'Test Case 1, without sort command:' | |
grep -F -f file2 -v file1 | uniq | |
echo 'Test Case 1, with sort command:' | |
grep -F -f file2 -v file1 | sort |uniq |
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 tweepy | |
__author__ = 'dedunumax' | |
''' | |
This script will remove all the followers from your twitter account. For that first it will block user one by one and | |
then unblock them. If you are following your followers, you won't be subscribed to them anymore once you run this job. | |
Rub this script carefully. | |
Install tweepy module using pip. To install tweepy run below command in your terminal. |
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
cat data.csv | awk -F',' '{print " SET \""$1"\" \""$2 "\"\n"}'| /opt/redis-2.8.17/src/redis-cli --pipe |
NewerOlder