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 main | |
import( | |
"fmt" | |
m "math" | |
"os" | |
"io/ioutil" | |
"net/http" | |
"strconv" | |
) |
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 com.smc.jdbc; | |
import java.sql.DriverManager; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
public class JDBCStatementCreateExample { | |
private static final String DB_DRIVER = "oracle.jdbc.driver.OracleDriver"; |
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.*; | |
import java.util.*; | |
public class TestClass { | |
public static void main(String[] args) throws IOException { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
PrintWriter wr = new PrintWriter(System.out); | |
int T = Integer.parseInt(br.readLine().trim()); | |
for(int t_i=0; t_i<T; t_i++) |
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.*; | |
import java.util.*; | |
import java.text.*; | |
public class Template { | |
private static Scan scanner = new Scan(System.in); | |
private static Print printer = new Print(); | |
public static void main(String args[]) throws Exception { |
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; | |
class Hit { | |
static int arr[][], N; | |
public static void main(String args[]) throws Exception { | |
BufferedReader ob = new BufferedReader(new InputStreamReader(System.in)); | |
N = Integer.parseInt(ob.readLine()); |
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
Files.upload = function (ctx,options,cb) { | |
if(!options) options = {}; | |
console.log('File Uploading.....'); | |
//console.log(ctx.req.headers['mobile']); | |
//console.log(ctx.mobile); | |
ctx.req.params.container = 'common'; | |
Files.app.models.container.upload(ctx.req,ctx.result,options,function (err,fileObj) { | |
if(err) { | |
cb(err); | |
} else { |
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
*/5 * * * * /home/aws/scripts/savelogs.sh | |
*/10 * * * * /home/aws/scripts/cps3z.sh |
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 for creating zip file | |
echo "create a zip and cp to s3 " | |
DATE="`date '+%Y%m%d%H%M%S'`.zip" | |
zip -e $DATE ../logs | |
aws s3 cp ../logs https://s3-external-1.amazonaws.com/cf-templates-............w.templatek..... |
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/sh | |
#create a log file with current timestamp | |
DATE="`date '+%Y%m%d%H%M%S'`.log" | |
./systeminfo.sh > ../logs/$DATE | |
echo "Log file saved." |
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 "Description : This scipts will display system information" | |
echo "Disk Consumption : " | |
df | |
echo "Memory Usage : " | |
free | |
echo "Network Connections : " | |
vmstat | |
netstat |