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
# Callable script from an application. The directory is predefined in the backup folder. | |
echo "Starting the export at "`date` | |
# su - oracle | |
#/home/oracle | |
#cd /DSSNEXP/ | |
cd /u01/app/oracle/product/11.2.0/xe/bin | |
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe; export ORACLE_HOME | |
PATH=$ORACLE_HOME/bin:$PATH; export PATH | |
mkdir /home/backup | |
DATE=`date +%Y-%m-%d-%r` |
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
# For this script to work following commands should be executed first | |
# yum install -y mplayer-gui | |
# yum install -y xine | |
# yum install -y vlc | |
# yum install -y mplayer | |
mplayer -tv driver=v4l2:fps=1 -vo jpeg -vf framestep=5 -frames 5 tv:// | |
if [ ! -d "right" ]; then | |
mkdir right | |
fi | |
fileName=0 |
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 zipfile | |
import sys | |
import os, datetime | |
def zip_folder(folder_path, output_path): | |
"""Zip the contents of an entire folder (with that folder included | |
in the archive). Empty subfolders will be included in the archive | |
as well. | |
""" | |
parent_folder = os.path.dirname(folder_path) |
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
tell application "iTunes" | |
if player state is playing then | |
set myTrack to current track | |
copy name of myTrack to nameOfTrack | |
copy artist of myTrack to artistOfTrack | |
tell application "System Events" | |
tell process "Notification Center" | |
click menu bar item 1 of menu bar 1 | |
click button 1 of UI element 1 of row 2 of table 1 of scroll area 1 of window "window" | |
#display dialog nameOfTrack |
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.dchan.orm; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.Date; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.Set; | |
import org.hibernate.Hibernate; |
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.dchan.concurrent; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
/** | |
* Copyright (c) 2013 Dulitha Wijewantha (http://www.dulithawijewantha.com) | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
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.dchan.awesomebank | |
import scala.swing.SimpleSwingApplication | |
import scala.swing.MainFrame | |
import scala.swing.Button | |
import javax.swing.JPanel | |
import java.awt.BorderLayout | |
import scala.swing.FlowPanel | |
import scala.swing.TextField | |
import scala.swing.Label |
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
/** | |
* Copyright (c) 2013 Dulitha Wijewantha (http://www.dulithawijewantha.com) | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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
am = new carbon.registry.ArtifactManager(registry, "mobileapp"); | |
var attributes ={ | |
overview_status: "PENDING-REVIEW", | |
overview_name: ctx.name, | |
overview_platform:t, | |
overview_version: ctx.version, | |
overview_url: ctx.url, | |
overview_provider: ctx.provider, | |
overview_description: ctx.description, | |
overview_market:ctx.markettype, |