Script review
I am new to scripting and have asked lots of "newbie" questions. Would anyone be interested in doing a review of the attached script and providing feedback?
The premise of the script is to put a caller directly into queue (after holiday, DOW, TOD check), the caller holds for up to 3 minutes but should be able to press 1 at any point to leave a voicemail. What is not in the script is 1)announcing a caller's position in queue and 2)the redirect to voicemail is some random number until I get the system call handlers built.
Any feedback would be greatly appreciated. Remember: first time/insane thinking/no programming skills.
Aaron,
Comments on your script are as follows:
In the Connected branch of the Select Resource step you do not need to mark the call as handled as the system will do that for you if the call is answered by the agent
You can route calls to voicemail boxes directly by transferring calls to the voicemail pilot number and modifing the destination to be the mailbox number
You don't seem to loop back to "DAY QUEUE LOOP" when a call is in queue, is this by design?
As you progress to writing more complex scripts, you might consider learning to leverage XML for those dynamic parameters that change. It saves having application pages with dozens of parameters on them.
-Steven
Please help us make the communities better. Rate helpful posts!
Similar Messages
-
"Hot Folder to FTP" script review please
I'm trying to make a folder on my Mac that is a "Hot Folder." I want this folder to have an action/script that as soon as it sees a new file added it will open Fetch and upload via mirror to an FTP folder.
I was able to make the Fetch portion of the script without issue, but making the folder "Hot" is a bit more difficult for me. I tried to use some script from the sample script "add - new item alert" but have been unsuccessful. I'm hoping some of you Applescript pros can review this and tell me how to correct. Or perhaps you know of a better way to make this work with automator.
SCRIPT:
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
--get the name of the folder
set the folder_name to the name of this_folder
end tell
-- find out how many new items have been placed in the folder
set the item_count to the number of items in the added_items
--create the alert string
if the item_count is greater than 1 then
tell application "Fetch"
activate
make new transfer window at beginning with properties {hostname:"ftp.hostname.here", username:"myusername", password:"mypassword", initial folder:"/pub/pao/images/"}
mirror alias "Macintosh HD:Users:Bill:Desktop:test:" to url "ftp://myusername:@ftp.hostname.here/pub/pao/images/" format Automatic without delete strays
end tell
end if
end try
end adding folder items to
Thank you all!Well, the most obvious problem is:
if the item_count is greater than 1 then
If you drop a single file into the folder, nothing will happen. That's because item_count will be 1, not greater than 1.
If you don't care about how many files were dropped (because Transmit's mirror function will just synchronize the differences, then omit this line altogether - the script won't fire unless at least one file was added. -
How can I turn off the automatic reload/refresh on websites like Drudge Report?
These sites refresh about every few minutes are this is annoying when I'm in the middle on reading something.
The Drudge Report site uses a JavaScript timer to reload the page every 3 minutes.
You can cancel the timer on that website with this bookmarklet.<br />
<br />
<pre><nowiki>javascript:clearInterval(timer);void(autoRefresh=null);
</nowiki></pre>
* http://en.wikipedia.org/wiki/Bookmarklet
See this for a Greasemonkey script:
*http://userscripts.org/scripts/review/13594 -
There is an items bar which allows one to go directly to the news. The bar items are: Web, Images, Videos, Maps, News, Shopping, more.. The background color was either white or gray with blue print. Now the background color is black and I can barely see the items to click on. I downloaded Firefox twice and the problem is the same.
That is a Google experiment:
* http://googlesystem.blogspot.com/2011/06/googles-experimental-black-navigation.html
* http://googleblog.blogspot.com/2011/06/evolving-google-design-and-experience.html
* http://googleblog.blogspot.com/2010/05/spring-metamorphosis-googles-new-look.html
* http://forums.mozillazine.org/viewtopic.php?f=7&t=2239295
* http://userscripts.org/scripts/review/105744 Source for "Google Bar Classic" -
Data Miner Extension in SQL Developer 4.0 EA3 Release: EA3 Repository Migration Failure
The Data Miner extension in the SQL Developer 4.0 EA3 release fails when attempting to migrate the repository to EA3. This posting contains instructions on how to recover from this failure as well as to successful migrate the repository from EA2 to EA3. There are no problems when just installing a fresh Data Miner repository.
Sorry about the difficulty if this has caused you any problems.
Mark
Failure message displayed in log when migrating to EA3:
Error report -
ORA-06550: line 96, column 40:
PLS-00382: expression is of wrong type
ORA-06550: line 96, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Instructions on how to recover from failure and continue using original version of SQL Developer:
1) Execute the following sql as SYS in order to allow the Data Miner repository to be open for use again:
UPDATE ODMRSYS.ODMR$REPOSITORY_PROPERTIES
SET PROPERTY_STR_VALUE = 'LOADED'
WHERE PROPERTY_NAME = 'REPOSITORY_STATUS';
COMMIT;
2) During attempted migrationto EA3 failed, access priviliges to the Data Miner repository are revoked from users. In order to use Data Miner again, these grants must be reapplied. You can either use the UI guided process to accomplish this, which requires the SYS password, or you can run the usergrants.sql script, again as the SYS user. For instructions on how to run the usergrants.sql script, or any adminstrative script, review the instructions contained in the install_scripts_readme.html file. You can find this file in the SQL Developer directories created when you unzipped SQL Developer. It is located in the following relative directory: \<SQL Developer Install Directory>\sqldeveloper\dataminer\scripts.
Instructions on how to successfully migrate to EA3.
If you have already attempted to migrate to EA3 and failed, then you need to perform the recovery instructions noted above, after which you can continue with the instructions below.
If you have not yet attempted to migrate to EA3, then just following the instructions below.
1) Replace all contents the script file createxmlworkflowsbackup.sql with specification contained at the end of this posting. The file to edit can be found in the \<SQL Developer Install Directory>\sqldeveloper\dataminer\scripts directory.
2) After completing the edit to createxmlworkflowsbackup.sql, you can proceed with the UI guided migration or perform the migration using the appropriate migration script. Review the install_scripts_readme.html file in the /dataminer/scripts directory for instructions on how to perform the migration using the script. For the UI migration, simply open any user connection in your Data Miner navigator, and you will be prompted to perform the migration.
WHENEVER SQLERROR EXIT SQL.SQLCODE;
DEFINE MAX_VERSIONS = 30
EXECUTE dbms_output.put_line('Start Backup Data Miner Workflows ' || systimestamp);
DECLARE
table_cnt NUMBER;
BEGIN
SELECT count(*) INTO table_cnt FROM all_tables WHERE owner='ODMRSYS' AND table_name='ODMR$WORKFLOWS_BACKUP';
IF (table_cnt = 0) THEN
EXECUTE IMMEDIATE '
CREATE TABLE ODMRSYS.ODMR$WORKFLOWS_BACKUP
USER_NAME VARCHAR2(30 CHAR) NOT NULL
, PROJECT_ID NUMBER NOT NULL
, PROJECT_NAME VARCHAR2(30 CHAR) NOT NULL
, PJ_CREATION_TIME TIMESTAMP(6) NOT NULL
, PJ_LAST_UPDATED_TIME TIMESTAMP(6)
, PJ_COMMENTS VARCHAR2(4000 CHAR)
, WORKFLOW_ID NUMBER NOT NULL
, WORKFLOW_NAME VARCHAR2(30 CHAR) NOT NULL
, WORKFLOW_DATA SYS.XMLTYPE
, CHAIN_NAME VARCHAR2(30 CHAR)
, RUN_MODE VARCHAR2(30 CHAR)
, STATUS VARCHAR2(30 CHAR) NOT NULL
, WF_CREATION_TIME TIMESTAMP(6) NOT NULL
, WF_LAST_UPDATED_TIME TIMESTAMP(6)
, BACKUP_TIME TIMESTAMP(6) NOT NULL
, VERSION NUMBER NOT NULL
, WF_COMMENTS VARCHAR2(4000 CHAR)
, CONSTRAINT ODMR$WORKFLOWS_BACKUP_PK PRIMARY KEY
PROJECT_ID
, WORKFLOW_ID
, VERSION
ENABLE
LOGGING
PCTFREE 10
INITRANS 1
XMLTYPE COLUMN "WORKFLOW_DATA" STORE AS BASICFILE CLOB';
END IF;
END;
DECLARE
schema_old_ver VARCHAR2(30);
schema_ver VARCHAR2(30);
patch VARCHAR2(30);
db_ver VARCHAR2(30);
v_storage VARCHAR2(30);
schema_data CLOB;
v_db_11_2_0_2 NUMBER; -- db is <= 11.2.0.2?
row_cnt NUMBER;
ver_num NUMBER := 1;
maintaindom NUMBER;
workflow_rec ODMRSYS.ODMR$WORKFLOWS_BACKUP%ROWTYPE;
BEGIN
SELECT STORAGE_TYPE INTO v_storage FROM ALL_XML_TAB_COLS WHERE OWNER='ODMRSYS' AND TABLE_NAME='ODMR$WORKFLOWS' AND COLUMN_NAME='WORKFLOW_DATA';
if (db is >= 11.2.0.3 AND SQL Dev > 3.0) OR (db is <= 11.2.0.2 AND MAINTAIN_DOM_PATCH_INSTALLED)
back up all workflows
end if
IF (v_storage != 'BINARY') THEN
-- determine xml schema version
SELECT XMLSerialize(CONTENT SCHEMA AS CLOB) INTO schema_data
FROM DBA_XML_SCHEMAS WHERE schema_url = 'http://xmlns.oracle.com/odmr11/odmr.xsd' AND owner = 'ODMRSYS';
maintaindom := INSTR(schema_data, 'xdb:maintainDOM="false"', 1, 1);
-- determine database version
SELECT version INTO db_ver FROM product_component_version WHERE product LIKE 'Oracle Database%';
--- Check schema compatibility
schema_old_ver := '11.2.0.1.9'; -- default value
BEGIN
SELECT property_str_value INTO schema_ver
FROM "ODMRSYS"."ODMR$REPOSITORY_PROPERTIES" WHERE property_name = 'WF_VERSION';
IF schema_old_ver = schema_ver THEN
IF NOT (db_ver = '11.2.0.1' OR db_ver = '11.2.0.2') THEN
dbms_output.put_line('WARNING: The backup process can not be done, The workflows need to be migrated first');
RETURN;
END IF;
END IF;
EXCEPTION WHEN NO_DATA_FOUND THEN
schema_ver := schema_old_ver;
dbms_output.put_line('No WF_VERSION found. Defaults to: ' || schema_old_ver);
END;
-- determine if MAINTAIN_DOM_PATCH_INSTALLED
IF (INSTR(db_ver, '11.2.0.2') > 0 OR INSTR(db_ver, '11.2.0.1') > 0 OR INSTR(db_ver, '11.2.0.0') > 0) THEN
v_db_11_2_0_2 := 1;
BEGIN
SELECT PROPERTY_STR_VALUE INTO patch FROM ODMRSYS.ODMR$REPOSITORY_PROPERTIES WHERE PROPERTY_NAME = 'MAINTAIN_DOM_PATCH_INSTALLED';
patch := UPPER(patch);
EXCEPTION WHEN NO_DATA_FOUND THEN
patch := 'FALSE';
END;
ELSE
v_db_11_2_0_2 := 0;
END IF;
END IF;
IF ( v_storage = 'BINARY'
OR (v_db_11_2_0_2 = 0) -- db is >= 11.2.0.3
OR ((v_db_11_2_0_2 > 0) AND ((patch = 'TRUE') OR (maintaindom = 0))) ) THEN -- db is <= 11.2.0.2 AND (MAINTAIN_DOM_PATCH_INSTALLED OR maintaindom="true")
SELECT count(*) INTO row_cnt FROM ODMRSYS.ODMR$WORKFLOWS_BACKUP;
IF (row_cnt > 0) THEN
SELECT NVL(MAX(VERSION)+1,1) INTO ver_num FROM ODMRSYS.ODMR$WORKFLOWS_BACKUP;
END IF;
FOR wf IN (
SELECT
p.USER_NAME "USER_NAME",
p.PROJECT_ID "PROJECT_ID",
p.PROJECT_NAME "PROJECT_NAME",
p.CREATION_TIME "PJ_CREATION_TIME",
p.LAST_UPDATED_TIME "PJ_LAST_UPDATED_TIME",
p.COMMENTS "PJ_COMMENTS",
x.WORKFLOW_ID "WORKFLOW_ID",
x.WORKFLOW_NAME "WORKFLOW_NAME",
xmlserialize(DOCUMENT x.WORKFLOW_DATA as CLOB indent size = 2) "WORKFLOW_DATA",
x.CHAIN_NAME "CHAIN_NAME",
x.RUN_MODE "RUN_MODE",
x.STATUS "STATUS",
x.CREATION_TIME "WF_CREATION_TIME",
x.LAST_UPDATED_TIME "WF_LAST_UPDATED_TIME",
x.COMMENTS "WF_COMMENTS"
FROM ODMRSYS.ODMR$PROJECTS p, ODMRSYS.ODMR$WORKFLOWS x
WHERE p.PROJECT_ID = x.PROJECT_ID
LOOP
workflow_rec.USER_NAME := wf.USER_NAME;
workflow_rec.PROJECT_ID := wf.PROJECT_ID;
workflow_rec.PROJECT_NAME := wf.PROJECT_NAME;
workflow_rec.PJ_CREATION_TIME := wf.PJ_CREATION_TIME;
workflow_rec.PJ_LAST_UPDATED_TIME := wf.PJ_LAST_UPDATED_TIME;
workflow_rec.PJ_COMMENTS := wf.PJ_COMMENTS;
workflow_rec.WORKFLOW_ID := wf.WORKFLOW_ID;
workflow_rec.WORKFLOW_NAME := wf.WORKFLOW_NAME;
workflow_rec.WORKFLOW_DATA := SYS.XMLTYPE(wf.WORKFLOW_DATA);
workflow_rec.CHAIN_NAME := wf.CHAIN_NAME;
workflow_rec.RUN_MODE := wf.RUN_MODE;
workflow_rec.STATUS := wf.STATUS;
workflow_rec.WF_CREATION_TIME := wf.WF_CREATION_TIME;
workflow_rec.WF_LAST_UPDATED_TIME := wf.WF_LAST_UPDATED_TIME;
workflow_rec.BACKUP_TIME := SYSTIMESTAMP;
workflow_rec.VERSION := ver_num;
workflow_rec.WF_COMMENTS := wf.WF_COMMENTS;
BEGIN
-- Output the ids (proj name, workflow name, proj id, workflow id)
dbms_output.put_line('Backup workflow: ('||wf.PROJECT_NAME||', '||wf.WORKFLOW_NAME||', '||wf.PROJECT_ID||', '||wf.WORKFLOW_ID||')');
INSERT INTO ODMRSYS.ODMR$WORKFLOWS_BACKUP VALUES workflow_rec;
COMMIT;
EXCEPTION WHEN OTHERS THEN
dbms_output.put_line('Backup workflow failed: ('||wf.PROJECT_NAME||', '||wf.WORKFLOW_NAME||', '||wf.PROJECT_ID||', '||wf.WORKFLOW_ID||')');
END;
END LOOP;
END IF;
-- keep the latest 30 versions
EXECUTE IMMEDIATE 'DELETE FROM ODMRSYS.ODMR$WORKFLOWS_BACKUP WHERE VERSION <= :1' USING (ver_num - &MAX_VERSIONS);
COMMIT;
EXCEPTION WHEN OTHERS THEN
ROLLBACK;
RAISE_APPLICATION_ERROR(-20000, 'Workflow backup failed. Review install log.');
END;
EXECUTE dbms_output.put_line('End Backup Data Miner Workflows. ' || systimestamp);823006 wrote:
5.a. XLS export of big number columns looses precision, for example a number(38) column with all digits used.
I believe excel only holds 15 digits of precision.
Edited by: 823006 on Jan 18, 2011 8:14 AMThen it would be nice if you can define the "excel type" of each column. So you can make this number a "string" in the XLS.
Edited by: user9361780 on Jan 18, 2011 9:12 AM -
Flash Player - Disable Hardware Acceleration - Apple TV-Mac OS 10.4.7/Firefox
Hello all,
I have been going down a fun path getting my 1st Generation Apple TV (160 GB HD) to run Hulu natively (without PlayOn restreaming). After fun times getting Firefox and Flash Player working, I blasted through setting up Hulu Widget to keep the video size small (Apple TV in 480p defaults to an 800x600 res). Things look pretty good. I maxed out buffering/cache for all Hulu related sites within Global settings, this produced nice improvements. I found a GreaseMonkey script that forces the Flash Player to always render Low Quality video. This helps immensely at stopping stuttering with little trade off in quality. My last piece to try to tweak video playback (aside from monkeying around with the OS X kernel) is the disable Hardware Acceleration.
BUT, I am having a major problem with mouse support or something. Everytime I bring up the Display settings via a Right Click, I cannot uncheck "Enable hardware acceleration". Surprisingly clicking it 500 times still does not make it uncheck.
I have searched high and low but have not found a clearcut way to disable it via script or other non-interactive means.
I wonder if there might be a javascript that could be plugged into GreaseMonkey to accomplish the end goal. This blog and Adobe document refer to the wmode parameter and how to use it to disable HA.
http://niquimerret.com/?p=159
http://www.adobe.com/devnet/flashplayer/articles/fplayer10_1_hardware_acceleration.html
I am thinking perhaps I can take the Low Quality JS (http://userscripts.org/scripts/review/38994) and replace "quality" with "wmode". Am I on track? It seems "opaque" might be the right one. http://kb2.adobe.com/cps/127/tn_12701.html
There is a case related to my question: https://bugs.adobe.com/jira/browse/FP-5748
Any tips, clues, pointers, commiserations?Hi, LOL at my screen moniker. That's interesting that the FF beta has an Option for that. The only problem, is that I have heard that each browser must UNcheck the H.A. I'm sure you'll find out.
Hope that works at least for FF. Let me know if you have time.
I've been checking out Apple TV and Google TV. Just saved the links and some info, haven't had time to go further. I'd prefer Apple TV over Google tho.
I have a 55" HD Sony/Blu-ray Surround Sound Speakers, etc. I hooked up the VGA cable for Internet, and WOW on the Screen/Monitor!! Now I'm thinking about the iPhone 4 with VZ too, on their pre-order list for 2/3/11!
Hard to keep up with the Technology, moving faster today for some reason.
We are under the Snow & Ice warning, getting it now. Hope I don't lose power! If so, I'll be offline for sure.
If I find anything on that H.A. for IE, I'll let you know.
Thanks,
eidnolb -
The bar at the top of the page wich displays ,WEB, IMAGES. VIDIO ect is now with a black background which is hard to see,why would the colour have changed and can I change it back?
I did some investigation yesterday and found that is is caused by a change made by Google.
Google regularly does some experiments and makes changes.
See:
* http://googlesystem.blogspot.com/2011/06/googles-experimental-black-navigation.html
* http://googleblog.blogspot.com/2011/06/evolving-google-design-and-experience.html
* http://googleblog.blogspot.com/2010/05/spring-metamorphosis-googles-new-look.html
* http://forums.mozillazine.org/viewtopic.php?f=7&t=2239295
* http://userscripts.org/scripts/review/105744 Source for "Google Bar Classic" -
This a neat little greasemonkey script I found. You can watch youtube videos without flash.
It loads the mp4 or flv file into mplayer-plugin
http://userscripts.org/scripts/reviews/50771Too bad that Epiphany WebKit has no User.JS script support (the only setback for me to, finally, leave FF.
P/s: Epiphany Gecko and Midori have a partial support for User.JS scripts.
For your information:
Epiphany » Blog Archive » Epiphany 2.21.4 "The case of Mr. Epifanio Navegared"
HTML5 media support with GStreamer « Alp Toker
Last edited by RedArcher (2011-01-06 16:01:56) -
Using slide notes for closed captioning
Is there any way to import slide notes into closed
captioning? In our Captivates we use the slide notes to create a
script for the narration. This is exactly what we'd want to have
appear in the closed captioning, but currently we have to copy and
paste the notes for each slide into the closed captioning dialog.
Futzy and time consuming! Does anyone have suggestions for
streamlining this process?
Thanks!
JudiJudi,
I don't think there is a way to import slide notes into the
closed captions. But, I'm using the Closed Captions to create a
script document for the audio.
1. I import a blank MP3 onto the slide.
2. Right click the audio layer in the timeline, and then
click Closed Captions.
3. Type in the desired text you want displayed in the closed
captions.
4. Save the project.
5. Export the the project captions and closed captions to a
Word Doc.
6. Have the script reviewed and edited.
7. Import that same document back into Captivate. Your closed
captions will be automatically updated.
This is a nice way to create a design (script) document you
can use to send out for review instead of placing your scripts in
the slide notes section.
Hope this helps. -
Stored Outline Creation script for review
DB version:10gR2
I am new to stored Outlines and I've been asked to review a Stored Outline Creation script. This is the script
-- Log in as SYS
-- Grant necessary privileges to the User executing SQL in question.
grant create any outline to rec_sch
grant execute on dbms_outln to rec_sch
grant execute on dbms_outln_edit to rec_sch
-- Connect to that user(rec_sch) to create the outline
select name, category, used, sql_text from dba_outlines;
ALTER SESSION SET NLS_DATE_FORMAT='DD-MON-YYYY';
alter session set create_stored_outlines = TRUE;
declare
v_sqlstring varchar2(5000);
begin
v_sqlstring:= 'The SQL in Question';
execute immediate v_sqlstring;
end;
--After granting the UPDATE privilege on the outln.ol$ table to rec_sh user
--log in as rec_sh
alter session set create_stored_outlines = FALSE;
ALTER SYSTEM set use_stored_outlines = default;
update <font color="red"><b>outln.ol$</b></font>
set sql_text ='The SQL in Question';Is this script Ok?
Message was edited by:
user609308One error i didn't suspect -> don't using SID with lowercase and uppercase in the name.
Thing i've forgotten to say: variables have to be set both in the .bat and the first .sql but they have to match too with values in the init.ora. That why i would like to simplify all these declarations with unifying them into a single file.
If somebody can help me, please
Tif -
Does my client need to have Adobe Story to review my script?
In one of the Adobe video's, Paul Trani shows how we can share a script. I can only presume that whoever gets the script, must have Adobe Story installed to be able to review the script. What does my client need to be able to review my script.
Thanks,
KuhnenPartially, yes. When you share your script with your client, he/she can access it in Adobe Story. But for that installation is not necessary, he/ she can access it through the web application (https://story.adobe.com). What your client requires is - an account with Adobe Story and an internet connection.
You can also export your script in one of the formats available and send it across.
Hope it helps -
Please review my firewall script
This script is for my server, please don't laugh I'm a beginner in this area
My policy is to close everything and open needed ports only. Authentic pinging should be allowed
#!/usr/bin/bash
# Please check for iptables path first.
IPTABLES="/sbin/iptables"
FWD=`cat /proc/sys/net/ipv4/ip_forward`
echo 0 > /proc/sys/net/ipv4/ip_forward
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 1800 > /proc/sys/net/ipv4/tcp_keepalive_intvl
# Flush the old tables
$IPTABLES -F
$IPTABLES -X
# Set default dropping policy
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP
# Rules
# Allows incoming connections that are related to outgoing connection
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# Block invalid ICMP packets
$IPTABLES -A INPUT -m state -p icmp --state INVALID -j DROP
$IPTABLES -A FORWARD -m state -p icmp --state INVALID -j DROP
$IPTABLES -A OUTPUT -m state -p icmp --state INVALID -j DROP
$IPTABLES -A FORWARD -m state -p icmp --state INVALID -j DROP
# Block NEW without SYN
$IPTABLES -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
# Block fragments and Xmas tree as well as SYN,FIN, and SYN,RST
$IPTABLES -A INPUT -p ip -f -j DROP
$IPTABLES -A INPUT -p tcp --tcp-flags ALL ACK,RST,SYN,FIN -j DROP
$IPTABLES -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
$IPTABLES -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
# Allow ping
$IPTABLES -A INPUT -p icmp --icmp-type 11/1 -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 11/0 -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 0/0 -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 8/0 -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 3 -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -p tcp -m multiport --destination-port 22,80,443 -m state --state NEW -j ACCEPT
# Allow unlimited traffic on loopback
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT
# Allow all outgoing connections
$IPTABLES -A OUTPUT -m state --state NEW -j ACCEPT
# Make sure nothing comes or goes out of this box
$IPTABLES -A INPUT -j DROP
$IPTABLES -A OUTPUT -j DROP
$IPTABLES -A FORWARD -j DROP
Are the seperating DROP rules redundant ? Setting standard dropping policy is enough, right ?To my knowledge a package that does not match any rules will be matched against the default policy, so you do not have to drop everything explicitly.
And you have a double
# Block invalid ICMP packets
$IPTABLES -A FORWARD -m state -p icmp --state INVALID -j DROP
$IPTABLES -A FORWARD -m state -p icmp --state INVALID -j DROP
Which - if my previous statement is correct - you shouldn't need at all (the DROP rules, that is).
I don't get why you're specifying this again either:
# Make sure nothing comes or goes out of this box
$IPTABLES -A INPUT -j DROP
$IPTABLES -A OUTPUT -j DROP
$IPTABLES -A FORWARD -j DROP
You already set policies, to me this looks like twice the work...
Also, keep in mind iptables will treat the rules chronologically. So first you define what's allowed, then you define what's blocked. It will work its way down the rules until it finds a match, if not, it will resort to the default policy.
Edit: Bash is in /bin on Arch, not /usr/bin. -
Please review OS Builder scripts
Hi all,
I published my project here for building a system from scratch:
https://github.com/walterjwhite/OS-builder
It currently supports building Arch / Funtoo / Gentoo images. It will install software, configure the system (apply an overlay of configuration files), run configuration commands, setup users and groups I will have to show a sample 'system' configuration to illustrate how it works. I was looking for feedback regarding the scripts to see: 1, is there a similar thing that does a better job, 2, if the community would think it would be useful.
This is similar to the archiso / archbuild scripts but handles much more configuration on top of that. It still does have some hard-references, but it can be adapted.
I use this to periodically generate systems to use and at the same time keep a running backup of my system with all the configuration steps applied.
Thanks,
Walterxx
-
Please review my script.
I am have problem with this script. I only need information with MAX earned hours and last gpa during current term. This script is giveing me a list of gpa and earned hours.
Here is the script.
SELECT substr(savadmt_first_name| | ' ' | |savadmt_mi| |' '| |savadmt_last_name,1,25) fullname,
substr(x.spraddr_street_line1,1,15) address,
decode(x.spraddr_city,null,null,substr(x.spra ddr_city| |', '| |x.spraddr_stat_code| |'
'| |x.spraddr_zip,1,25)) csz,
savadmt_age age,
shrlgpa_gpa gpa,
shrlgpa_hours_earned hrs,
(sv.sortest_test_score + sm.sortest_test_score) sat,
(ae.sortest_test_score + am.sortest_test_score + ac.sortest_test_score) act
FROM
saturn.shrlgpa,saturn.spraddr x,
saturn.sortest sv, saturn.sortest sm, saturn.sortest ae,
saturn.sortest am, saturn.sortest ac,
savadmt
WHERE
savadmt_term_code = '&term'
and x.rowid(+) =
f_get_address_rowid(savadmt_pidm, 'ADMSADDR', 'A', sysdate,1,'S',null)
and shrlgpa_pidm = savadmt_pidm
and sv.rowid(+) = f_get_sortest_rowid(savadmt_pidm, 'ADMSTEST', 1)
and sm.rowid(+) =
f_get_sortest_rowid(savadmt_pidm,
'ADMSTEST', 2)
and ae.rowid(+) = f_get_sortest_rowid(savadmt_pidm, 'ADMSTEST', 4)
and am.rowid(+) = f_get_sortest_rowid(savadmt_pidm, 'ADMSTEST', 5)
and ac.rowid(+) = f_get_sortest_rowid(savadmt_pidm, 'ADMSTEST', 6)
and shrlgpa_gpa >= 2.0
and savadmt_age < 27
and shrlgpa_hours_earned >= 60
and ((sv.sortest_test_score + m.sortest_test_score) >= 920
or (ae.sortest_test_score +
am.sortest_test_score +
ac.sortest_test_score) >= 19)
I will appricate this.
Thank you for taking the time out.
nullI may be being dense here...how are your gpa and earned hours stored in your tables? Do you need a max(gpa) function and a calculation summing earned hours?
null -
Please review the RMAN script and throw any comments which will increase KB
Dear Sirs:
I would be grateful if anyone in this forum checks whether the RMAN strategy taken by me is OK or require any room for improvement. I have not yet
moved into production.
Environment: ORACLE 10G R2 running on RAC, RHEL 4.0 for Intel Itanium. RMAN script runs every night at 10PM from node 1 of 2.
ASM is used and all datafiles, controlfiles, arc, redo in SAN
Process:
<1> Empty folder "PreviousdayBackup
<2> Move backup of yesterday night to "PreviousdayBackup"
<3> Execute RMAN the script provided below.
run {
backup
filesperset=15
incremental level 0
spfile format '/archive/backup/rman/spfile_%d_%s_%T.bak' tag 'spfile_backup'
database format '/archive/backup/rman/data_%d_%s_%T.bak' tag 'full_data_backup';
crosscheck backup;
sql 'alter system archive log current';
crosscheck archivelog all;
backup filesperset 288 format '/archive/backup/rman/cscdb_data_archive_%d_%u' archivelog all delete input;
delete archivelog all completed before 'sysdate-7';
delete noprompt expired archivelog all;
delete noprompt obsolete;
backup current controlfile format '/archive/backup/rman/%d_data_control_%s_%p_%u' tag 'control_file';
The Tape runs at 3:00AM in the morning and takes all the files from '/archive/backup/rman/'
_*RMAN Configuration*_
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/archive/backup/rman/ctrl_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/product/1020/db_1/database/snapcf_cscdb1.f';
I am also not getting the concepts properly on :
delete archivelog all completed before 'sysdate-7';
delete noprompt expired archivelog all;
delete noprompt obsolete;
Is the delete within the RMAN pieces or within the folder. It would be great if someone can explain me on these
Awaiting for your kind response
Caesar
Edited by: caesar dutta on 10-May-2012 00:10Hi emre baransel :
Step 1: Delete from folder "previousdaybackup"
Step 2: Move last night backup from "/archive/backup/rman" to "previousdaybackup"
Step 3: Run RMAN and backup is stored at "/archive/backup/rman"
Stpe 4: Data is backed up to DLT cartridge from "/archive/backup/rman"
The folder "/archive/backup/rman" is a separate partition from SAN mounted in the LINUX SYSTEM as ext3
Why did you chose filesperset=15, do you have specific purpose?Well I am looking at existing RMAN in the place and not changing any basic configuration. Frankly speaking I do not have answer to this.
I have changed the RMAN commands as
run {
backup
filesperset=15
incremental level 0
spfile format 'D:\archive\backup\rman\cscdb1\spfile_%d_%s_%T.bak' tag 'spfile_backup'
database format 'D:\archive\backup\rman\cscdb1\data_%d_%s_%T.bak' tag 'full_data_backup';
crosscheck backup;
sql 'alter system archive log current';
crosscheck archivelog all;
backup filesperset 288 format 'D:\archive\backup\rman\cscdb1\cscdb_data_archive_%d_%u' archivelog all not backed up 2 times;
delete noprompt archivelog all completed before 'sysdate-7';
delete noprompt expired archivelog all;
delete noprompt obsolete;
I feel that I will be in a safer side.
Please provide comments. Anything that will increase knowledge base and will educate others too in this forum.
regards,
caesar
Maybe you are looking for
-
I have an iphone 5 synced to my mac and also connected a samsung s3 to kies(samsung alternative to itunes). For some reason i now have all my dads contacts as well as my own and vice versa. How can i stop this happening?
-
Deleting tunes from hard drive and not ipod
I don't want to keep all the tunes on my hard drive, that I already uploaded into my ipod.. when I went to delete the files, through itunes it said next time I update my tunes, those will be removed from the ipod ?? So how do I delete them.. thanks
-
Questions about exporting to full quality?
Hey there - I just wanted to make sure that if I want to give my friend back a DV file from the converted tape that I choose Export, then Full Quality? I know that creates one file vs individual clips but her tape was one long one, I did chapter mark
-
Hi, In my procedure i am using cursor in which i am using the date format TO_CHAR(SYSDATE,'dd/mm/YYYY hh24:mi'). the default date format is 5/20/0010 12:00:00.000 AM. when i am using the TO_CHAR(SYSDATE,'dd/mm/YYYY hh24:mi') in individual select stat
-
How to install Firefox in English when in Greece?
I download and install twice the english version of firefox from firefox's website, but when I start installing I don't get asked what is my prefered language and everything start in Greek and finally the greek version is installed again and again!!!