​
Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Saturday, 29 July 2017

Creating a folder with limited size

Creating a folder with limited size


To create a folder with fixed size, one of the solutions is to create a limited size filesystem and mount it.

Create a file that will be a container of the filesystem. Just take ANY file on your system that has a suitable size, or create one by
$ dd if=/dev/null of=~/myfs bs=SIZE_OF_BLOCK_IN_BYTES count=SIZE


Format the file with the FS you want
$ mkfs.ext4 ~/myfs
It will say that it creates an FS on a non-block device.



Mount the FS
mount -o loop,rw,usrquota,grpquota ~/myfs  /path/of/mount/point
{ Read More }


Creating libraries and linking to libraries in Vala

Creating libraries and linking to libraries in Vala


This is an example of how to create a library in vala, and how to access it using several different methods. This example includes:
  1. A shared library written in vala, including
    • shared object (.so), and how to install it
    • headers (.h), and
    • bindings (.vapi)
  2. A command-line tool that uses the library by direct-linking
  3. A dbus server that uses the library by direct linking
    • makes the library available to other dbus-aware applications
    • self-terminating process after use (not a daemon)
  4. A command-line tool that uses the library via dbus and the dbus-server.

The first half of the example is based on the official vala tutorial library example,
I have added dbus connectivity and a bit more explanation that I found helpful.





1) Create an empty directory. These steps create a lot of files!

 $ mkdir test_library
$ cd test_library



2) Create the library. Save this file as libtest.vala:

// BEGIN
public class MyLib : Object {

public string hello() {
return "Hello World from MyLib";
}

public int sum(int x, int y) {
return x + y;
}
}
// END



3) Create the .c, .h (C header), and .vapi (vala binding) files:
 -C --ccode Output C code instead of compiled
-H --header=file Output C header file
--library=name Assign name to library
--vapi Assign name to vapi file
-b --basedir=dir Use dir as the base source dir (For me, this is unnecessary)

$ valac -C -H libtest.h --library libtest libtest.vala --basedir ./



4) Compile the library using:

 -shared Create a .so shared object
-fPIC Position Independent Code (PIC) suitable for use in a shared library
$(pkg-config --cflags gobject-2.0)
Output: -I/usr/include/glib-2.0
-I/usr/lib/i386-linux-gnu/glib-2.0/include
-o filename Output filename

$ gcc -shared -fPIC -o libtest.so $(pkg-config --cflags --libs gobject-2.0) libtest.c



5) Create the command-line application that uses the library by linking.
   Save this file as hello.vala:

// BEGIN
void main() {
var test = new MyLib();

// MyLib hello()
stdout.printf("%s ", test.hello());

// MyLib sum()
int x = 4, y = 5;
stdout.printf("The sum of %d and %d is %d ", x, y, test.sum(x, y));
}
// END




6) Compile the command-line application.
Using vala, there need to be TWO links:
  • The vala link to a .vapi file (in this example, test.vapi)
  • The gcc link to a C library (in this example, -X -ltest to add libtest.so)

 - The vala link to a .vapi file (in this example, test.vapi)
- The gcc link to a C library (in this example, -X -ltest to add libtest.so)

-X --Xcc=-I. Pass the -I. (include current directory) to gcc.
GCC will look for shared libraries in the current directory first
-X --Xcc=-L. Pass the -L. (add current directory to search path) to gcc.
-X --Xcc=-ltest Link library "libtest" which we just created in the current directory.

If we had the libtest.so in the local directory, we could use:

$ valac -X -I. -X -L. -X -ltest -o hello hello.vala libtest.vapi



7) Test the command-line application that uses the library:
The library is in the local directory (uninstalled):

 $ LD_LIBRARY_PATH=$PWD ./hello
Hello World from MyLib
The sum of 4 and 5 is 9



8) We cannot easily use the local library for dbus.
So install the library to the expected location.
Copy the library to /usr/lib using:

 $ sudo cp libtest.so /usr/lib/



9) Test the (installed) command-line application:

 $ ./hello
Hello World from MyLib
The sum of 4 and 5 is 9



10) Create the dbus server that uses the library.
A server listens for requests from other applications. This server acts as a gateway: It translates other application requests for library methods into a library call, and then sends the response back across dbus to the original requestor.

Save this file as dbus_server.vala:

// BEGIN
// Source: https://live.gnome.org/Vala/DBusServerSample#Server

[DBus (name = "org.example.Demo")] // dbus interface name
public class DemoServer : Object {

/* Functions that access the library on the Demo interface
* Note the LACK of in the return strings.
* Vala automatically mangles my_function_name into the
* standard Dbus camelcase MyFunctionName
* So a function is "hello()" here, but "Hello" on Dbus
*/
public string sum () {
var test = new MyLib();
int x = 4, y = 5;
return "The sum of %d and %d is %d".printf( x, y, test.sum(x, y));
// Note the LACK of in the return strings
}

public string hello () {
var test = new MyLib();
return "%s".printf( test.hello());
}

}

[DBus (name = "org.example.DemoError")]
public errordomain DemoError { SOME_ERROR }

/* Dbus functions */
void on_bus_aquired (DBusConnection conn) {
try {
string path = "/org/example/demo";
conn.register_object (path, new DemoServer ());
} catch (IOError e) {
stderr.printf ("Could not register service "); }
}

void main () {
GLib.MainLoop loop = new GLib.MainLoop ();
GLib.TimeoutSource time = new TimeoutSource(3000); // 3 sec
GLib.BusType bus = BusType.SESSION;
string destination = "org.example.demo";
GLib.BusNameOwnerFlags flags = BusNameOwnerFlags.NONE;

Bus.own_name ( bus, destination, flags,
on_bus_aquired,
() => {},
() => stderr.printf ("Could not aquire name "));

// Use timeout to quit the loop and exit the program
time.set_callback( () => { loop.quit(); return false; });
time.attach( loop.get_context() ); // Attach timeout to loop

loop.run (); // Listen for dbus connections

}
// END



11) Compile the dbus server:
 Dbus requires the gio package (--pkg gio-2.0)
-X --Xcc=-I. Pass the -I. (include current directory) to gcc.
GCC will look for shared libraries in the current directory first
-X --Xcc=-L. Pass the -L. (add current directory to search path) to gcc.
-X --Xcc=-ltest Link library "libtest" which we just created in the current directory.

Since the library is installed, we can ignore those local directory flags:

$ valac --pkg gio-2.0 -X -ltest dbus_server.vala libtest.vapi



12) Create a dbus .service file, so dbus knows how to find our new dbus_server.
Save this file as dbus.service. Your third line will vary - use the real path:

// BEGIN

[D-BUS Service]

Name=org.example.demo

Exec=/home/me/vala/library/dbus_server

// END



13) Install the dbus service file:

 $ sudo cp dbus.service /usr/share/dbus-1/services/org.example.demo.service



14) Test the dbus server using an existing command-line application, dbus-send.
This is a command-line application using the library via dbus, using dbus_server for its intended purpose as a gatetay.

The sender is different each time because dbus-send creates a new process and connection each time it is used.
The destination is different because the server terminates after 3 seconds.

 $ dbus-send --session --type=method_call --print-reply 
--dest="org.example.demo" /org/example/demo org.example.Demo.Hello
method return sender=:1.3173 -> dest=:1.3172 reply_serial=2
string "Hello World from MyLib"

$ dbus-send --session --type=method_call --print-reply
--dest="org.example.demo" /org/example/demo org.example.Demo.Sum
method return sender=:1.3175 -> dest=:1.3174 reply_serial=2
string "The sum of 4 and 5 is 9"


15) Clean up:
Remove the dbus service file:
Remove the test library from /usr/lib

 $ sudo rm /usr/share/dbus-1/services/org.example.demo.service
$ sudo rm /usr/lib/libtest.so
{ Read More }


Creating a Community QR Poster

Creating a Community QR Poster


One of the first community publishing projects we undertook in my learning strategies class, was to produce a large QR code that will eventually hyperlink to our class website.  Our poster will be 29 pixels square to match our master QR image. If your students use one inch pixels, the group will produce an image almost two and a half feet wide. (Our final poster will be a bit larger than that.)

Step 1: Create a QR code that links to a classroom web page.  I used MobileFish QR Code Creator because it allows the user to specify the size of the first printed image.


Step 2: Decide on a way to cut the code into pieces so that each student can take on a part of the project.  With 16 high needs students in my class, I began our project by breaking our code into 16 equally sized unique squares.



Step 3: Enlarge each students piece of the puzzle so that the individual pixels can easily be seen and organized.  I enlarged each of the pieces to fit on full sheet of letter-sized paper.


Step 4 (Option 1): Provide each student with a piece of the puzzle. You might elect to print a puzzle grid template on which each student might recreate his/her pixels.  Just make sure the grid is filled with enough fairly precise squares.

 

Step 4 (Option 2): As an alternative, you can simply have each student produce a set number of dark squares that can be added to a master grid by a select team of students.  So long as the black pixels are composed of images that appear dark when viewed from a distance, the code should work.

Step 4 (Option 3): Instead of puzzle pieces, cut your QR code into strips, providing each student with a binary strip composed of black and white squares.  This solution would work wonderfully for a class composed of 29 students!

Step 5: I asked each student to complete images that represented their favourite things, their talents, and their goals for this school year.  For some, it took a long time to develop a list of words or icons that could most apty represent each individuals uniqueness. (It took even longer for students to produce clean dark images with black Sharpie pens.)


Step 6: Put it all together.  With our QR puzzle being completed on a part time basis, we hope to have a final poster ready in a week or so.


Community projects like this one call for each student to demonstrate some commitment to the collective.  The resulting symbol demonstrates to others that the unified group is made up of many uniquely talented individuals.  While we used hand-drawn sketches, Im confident that a similar project that uses coloured squares of paper, photographs or images cut from magazines, can yield a similarly effective symbol of class unity.
{ Read More }


Friday, 28 July 2017

Creating Desktop Launchers in 11 10 Ubuntu Oneiric

Creating Desktop Launchers in 11 10 Ubuntu Oneiric


As you might have already noticed, Oneiric doesnt let you create launchers by right-clicking the desktop. Different people have different needs, but I love to have CCSM and compiz --replace launchers (at least) at my desktop so I can just double-click those whenever disaster strikes. Thankfully, there is a workaround for creating launchers at the desktop in Oneiric.

First of all, make sure that the package gnome-panel is installed. It would do no harm, sitting there quietly. So, get to a Terminal and run:

sudo apt-get install --no-install-recommends gnome-panel

Now from the Alt + F2 run dialog or, even more conveniently, from a Terminal, run:

gnome-desktop-item-edit ~/Desktop/ --create-new

Name your launcher and enter the command to be launched as shown in the screenshot below. Clicking the OK button would immediately create the launcher.


Copying Existing Launchers

The above method you primarily need to create custom launchers that arent already present on your system; for creating launchers based on existing ones, there is a much easier method: simply copying them!

Therefore, navigate in Nautilus to /usr/share/applications, there youll find the vast majority of existing, system-wide launchers, and theyll be presented to you with the names and icons with which they also turn up in the Dash, Unity Launcher, and menus.

Now, you only got to do a simple copy & paste onto your desktop, whether directly on it or into its corresponding directory in your home directory. Done!

The executable bit will be automatically set, making the newly created copy of the concerning .desktop file a working launcher - it isnt set on the files in /usr/share/applications in the first place, since those arent executed, but sourced. Fortunately, Nautilus automatically takes care of that; but if you copy the launcher files via the command line, e.g. the Terminal, youd need to set it yourself!

User-Specific Launchers

User-specific launchers, including those of Wine and your possibly earlier created custom ones, are located in ~/.local/share/applications in your home directory (press Ctrl + H to see the hidden files/directories). Their executable bit also isnt set by default, but unlike the system-wide launchers, they turn up in Nautilus with their actual file names and generic icons (Wine launchers have at least their public names in their file names). Also unlike system-wide launchers, Nautilus wont automatically set the executable bit upon creating the copy, so youd need to set it yourself via Right-Click > Properties > Permissions.
{ Read More }


Creating hidden accounts on a XP Box

Creating hidden accounts on a XP Box


Others want to log in to XP under your name?
Need to have an account under the radar?

Whatever the need, note it can be done!

The problem is that user accounts always show up on the welcome screen on XP. Our goal is to hide them from there using a simple Windows registry tweak. This tweak requires an existing account, so use one thats already there or create a new one. I would recommend the later!

Now go into the Registry (click on "start" > "Run" and type "Regedit" (without quotes) and hit enter).

Now go to:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsNTCurrentVersionWinlogonSpecialAccountsUserList

Now right-click on the pane on the right and create a new DWORD. Make the name from "New Value #1" to the same as the AccountName you wish to hide. Example: if I wanted to hide an Account called StealthyMoFo, the DWORD Name would be StealthyMoFo.

Now double-click on the name and set the data value:

0 to hide it
1 to make it visible

Now exit the registry and reboot the machine for this to take effect.

To logon using this new account, when you see the welcome screen, hold down "ctrl+alt" and hit delete twice. this should take you to a normal usernamepassword prompt like Windows 2000. Enter the name and password of the hidden account to log on.


Two Side Notes:

  • This can be used to also force the Administrator account to show up on the welcome screen as it does in safe mode.
  • Your hidden account will still have a folder under Documents and Settings. So if someone sees it, they might suspect something. Try to use something that sounds like it might belong there like "RemoteService" or "DotNet" or "Admin". Most people wouldnt rise an eyebrow as those would seem like normal application/User accounts.

{ Read More }


Creating the Date Dimension using Kettle

Creating the Date Dimension using Kettle


Creating the Date dimension table is perhaps the most important common step to all dimensional modeling projects. According to Ralph Kimball � the author of The Data Warehousing Toolkit


�Data warehouses always need an explicit date dimension table. There are many date attributes not supported by the SQL Date function, including fiscal periods, seasons, holidays, and weekends. Rather than attempting to determine these nonstandard calendar calculations in a query, we should look them up in a date dimension table.�


The first step is to launch Kettle from the desktop. I have GeoKettle installed on my machine, which, for those who dont know, is simply a spatially enabled version of Pentahos Open source ETL platform (Kettle). If you dont have GeoKettle installed, my previous post shows the steps to download and install it on your local machine.


Using the sample Transformation as the starting point.

GeoKettle ships with some sample transformations that allow creation of Date dimensions. We can start with these and augment them based on our needs. The first two dimensions that are needed are Date and Time. According to best practices, Date and Time should be modeled as separate dimensions


Launching GeoKettle

If you have GeoKettle installed, launch it from the Applications menu on your machine.





Once GeoKettle is launched, go to the samples folder under GeoKettle/samples and open the file �General � Populate date dimension.ktr�



The following transformation is loaded on the screen.



Save the file to your local directory for review and possible modification. I saved the transformation with the GenerateDateDimension.ktr under my local work folder.


The default transformation generates dates from 1950 all the way to 2050. I only needed 50 odd years of dates for my purposes, so I needed to modify the start date. Right click and Edit the first step on the transformation to view dialog box for "Generate Rows."



In the dialog box that opens, we can see the default values as follows:



Now lets modify the default values as follows.

Step name: 20000 days: 50+ years
Limit: 20000
Fields > Value: 19900101


Next thing we need to do is to update the Table output parameters to our selected database schema. Right click on the "Table Output" step as shown in the screenshot below.



Define the database connection, by clicking on the "New" button next to the Connection field on the open dialog box.



Select the schema and table name. In my case, it was nydot and dim_date.



Click OK when done. 

The last step is to enable the hop, by right clicking on the arrow connecting to the last step and clicking on �Enable Hop� as shown in the picture below.



Next step is to run the transformation and test to make sure it works correctly. For this we click on the play button on the top menu, as shown in the picture below.



Clicking the button brings up the following dialog box.



Now, click on the Launch button to start the transformation. Once the transformation has executed, we can see the following metrics displayed on the screen.



Open pgAdmin tool to view the data by navigating to the schema and the date_dim table that was just created.



Also, now right clicking and viewing data


.... shows that the table is populated correctly.




We have just seen how to populate a basic Date Dimension table using Kettle open source ETL tool.

{ Read More }


Thursday, 20 July 2017

Creating custom username list wordlist for bruteforciing

Creating custom username list wordlist for bruteforciing


During brute-forcing every time you need custom  password list & username list. Username list is as well as important as password list, it should be unique for every organization.If we use traditional large number of username list , then it will be tedious process.Custom username list also useful in username enumeration.

Creating custom username list:-


(1)Jigsaw:-

During information gathering stage , you may use jigsaw script. It is great script for gathering employees `s details like fullname, position, department, email addresses.You should use script with your jigsaw credential.


some times email address`s initial can be username of employee.So you can get different username from output of jigsaw script.


(2)Username script:-

If you have full name of users then you can use username.py script to generate possible username by using different combination of first name & last name.


I also write bash script which generate possible username using first name, last name & birth date.


Creating Custom word list:-


(1)Cewl:-

Custom Word List generator. CeWL is a ruby app which spiders a given url to a specified depth, optionally following external links, and returns a list of words.



(2)Wyd:-

wyd is a password profiling tool that extracts words/strings from supplied files and directories. It parses files according to the file-types and extracts the useful information, e.g. song titles, authors and so on from mp3s or descriptions and titles from images.



(3)Cupp:-

People spend a lot of time preparing for effective dictionary attack. Common User Passwords Profiler (CUPP) is made to simplify this attack method that is often used as last resort in penetration testing and forensic crime investigations. A weak password might be very short or only use alphanumeric characters, making decryption simple. A weak password can also be one that is easily guessed by someone profiling the user, such as a birthday, nickname, address, name of a pet or relative, or a common word such as God, love, money or password.

{ Read More }


creating Virtual users on linux server using Proftpd

creating Virtual users on linux server using Proftpd


  ##################################################################
 proftpd FTP server user account creation using commands    ##################################################################

note:- If you have already configured proftpd server and just want to add new user , skip to step 3 direct

////////////////
//  step 1. 
////////////////

install proftpd on system if it is not installed using apt
command is 
apt-get install  proftpd-basic


/////////////////
//  Step 2
/////////////////

enter into directory /etc/proftpd
open file proftpd.conf
uncoment line number 34 (containg text DefaultRoot ~ )
and add this line just below it

AuthUserFile    /etc/proftpd/ftpd.passwd




//////////////
// Step 3
//////////////

now add virtual user to ftp server using command 
ftpasswd --uid <uid> --gid <gid> --name <username> --shell /bin/false --home <path> --passwd

here 

uid is the user id (assign 33 and user will behave like www-data user)
gid is group id (assign 33 to work as www-data)
name is the username which you want to add to ftp server
shell is the name of shell terminal have it /bin/false
home is the directory where user will be directed after successful login
passwd is for password and need not to supply password with command 

for example i want to create a user having name indishell and want to assign /ftp directory to him if user autheticate successfully
uid and gid is 33 
command will be 

ftpasswd --uid 33 --gid 33 --name indishell --shell /bin/false --home /ftp --passwd


press enter and supply new password for the user account


//////////////
// Step 4
////////////// 
now need to chmod and chown the /etc/proftpd/ftpd.passwd and /etc/proftpd/ftpd.group
these files contains FTP server usernames/groups and its password 

chmod 400 /etc/proftpd/ftpd.passwd /etc/proftpd/ftpd.group
chown proftpd.nogroup /etc/proftpd/ftpd.passwd /etc/proftpd/ftpd.group

and now are done :)
you can login to your ftp account using command
ftp  server_IP



Note:- if you are on ubuntu server, then value of uid and gid should be 33(web server id) else you may face issue in writing files ;)

enjoy >:D<
Thank you


-==[[Love to]]==--
zero Cool ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba ,Silent poison India,Magnum sniper,Atul  Dwivedi,ethicalnoob Indishell,Local root indishell,Irfninja indishell,Reborn India,L0rd Crus4d3r,AR AR,Mannu, ViKi, Hardeep singh Bhuppi,Mohit, Ffe, Anju, RR Mam, Acchi bacchi(Jagriti) and DON

{ Read More }


Tuesday, 11 July 2017

Creating virtual disk

Creating virtual disk



How do I create a virtual disk in Ubuntu?

Open a terminal (Applications -> Accessories -> Teminal), and enter these commands (this will create a 10 GB extra.virtual.disk, adjust line 2 to change these):
cd /host/ubuntu/disks
dd if=/dev/zero of=extra.disk bs=1MB count=10000 seek=1
mkfs.ext3 -F extra.disk

How do I create a virtual disk in Windows?

You can use qemu-img for that. Another dirty (but working) trick is to copy any other file of the desired size to C:wubidisks and rename it "root.disk", "home.disk", "swap.disk" or "extra.disk". Thats the Wubi equivalent of buying (and installing) a new hard disk.
If you are running Windows XP (may work in Windows 2000 and Vista as well) you can create a file by using the fsutil that is included with Windows. The command format is fsutil file createnew filename filesize where filename is the file you wish to create and filesize is the size of the file to be created in bytes.
{ Read More }


Creating Virtual Block Devices

Creating Virtual Block Devices


When playing with filesystems or setting up virtual machines, you may want to create virtual block devices (files that act similar to hard drives). Here I will explain the two ways to create such devices and the pros/cons of each

Normal Way

This is the normal way to create a block device and will create an 8 GiB pre-allocated device:
dd if=/dev/zero of=/path/to/dir/filename.img bs=1M count=8192
You may want to change the block size (bs), and change the count in order to change the capacity of the device.
The count x bs = capacity, so reducing the block size would reduce your capacity if you did not adjust the count accordingly.

Advantages

  • Better performance than with the "sparse" method
  • Cant run out of space before the underlying device is full (dedicated).

Disadvantages

  • This eats up your disk capacity very quickly. E.g. your disk is "full" after creating lots of these empty devices, and the majority of them may never reach half capacity.
  • Slow to create (has to write the capacitys worth in 0s to the physical drive)

Sparse Image

Create a "sparse" image with the following example command which creates a 100GB device
dd if=/dev/zero of=/path/to/dir/filename.img bs=1k count=1 seek=100M
The 100M is NOT meant to be 100GB
Running an ls -alh will clearly show the file as being 100G in size, but running a df -h on / shows that it is not used.

Advantages

  • Almost instantaneous creation
  • Only data written to the image actually takes up space on your physical drive. Thus, you can oversell your physical drive.

Disadvantages

  • Poorer performance when writing to.
  • May not be able to write to the device before its capacity is reached because the underlying device has been filled.
{ Read More }


Monday, 10 July 2017

Creating a Multi Node Cluster

Creating a Multi Node Cluster


I decided that I need to increase my mining power, so I setup two more nodes with the same hardware from my original post. The layout looks like this.

You only need to run geth on one node and connect your other ethminer instances (on node2 and node3) to your geth instance on (node1). That requires a little modification of the startup scripts to get everything connected.

Geth Start-Up

You need to tell geth to accept connections from remote hosts. The requires the following parameters.

 #!/usr/bin/env bash 
echo "Starting geth"
screen -dmS geth /usr/bin/geth --rpc --rpcaddr "0.0.0.0" --rpcport 8545 --rpccorsdomain "*"
#Basic geth startup script

--rpc enables the rpc console
--rpcaddr is the interface you want to listen on for conenctions. 0.0.0.0 is all interfaces
--rpcport is the port it will listen on 8545 is default
--rpccorsdomain is the domaint to accept request from

Ethminer Start-Up

To point your remote ethminers at your geth instance do the following in the startup script. You only need to do this on node2 and node3.

 #!/usr/bin/env bash 
echo "Starting Ethminer"
screen -dmS ethminer /usr/bin/ethminer -G -F http://192.168.1.57:8545
#Ethminer startup script for remote connections

-F puts ethminer into farm mode you need replace 192.168.1.57 with the IP of node where you are geth.

ethminer should start up as per normal. It will now just be getting work from the geth instance on node1.





{ Read More }


Friday, 7 July 2017

Creating a Kettle Repository

Creating a Kettle Repository


I wanted to create a new set of transformations that I was constructing for a project. For the same, I set up GeoKettle, a spatial ETL tool. Starting Kettle I was always wondered what the Central repository was. As I browsed through some old threads on user forums, I understood that Kettle repository was for centralizing your jobs and transformations across projects and users into a single place, so anyone could execute them.

That seemed like a good idea. However, most older posts had some concerns around its stability. Realizing that these concerns were probably five years or so old, I decided to set it up anyway.

First step is to create a Postgresql database user. For this, we need to first login as the postgres user within the Ubuntu environment and connect to the postgres

> su - postgres


Next we login to the psql environment and create a database level user called kettleadmin.
postgres > psql
psql > create user kettleadmin with password kettleadmin;


We then create a database called kettledb and we will grant all access to this database to user kettleadmin.

psql > create database kettledb;
psql> grant all on database kettledb to kettleadmin;

Now that we have setup the database, we can setup the kettle repository.
First step is to launch the GeoKettle shortcut. That brings the dialog box to choose your repository.


Now click the button for �New� to make a new repository, and click again on the following dialog box to create a new database connection.


On clicking the new button, another dialog box appears. Select Postgresql as the database connection type. Next, we specify the connection parameters to the database we have just created using credentials for kettleadmin as shown below


Click on �Test� to make sure the connection parameters are correct.


Once done, enter the additional details like name and description, and click �Create or Upgrade� to create the repository for the first time.



Once executed, the application will provide a list of commands executed.
Next, access the original command window and enter the default Login name and password for the database, which is admin/admin. Click on OK.


Now, on the dialog that appears, you can click on the top menu item �Repository� and click on link to �Explore Repository�.


This launches a window, where we can make changes to the current repository. The first step would be to add a new user for myself, to ensure I dont corrupt the configuration while working. I can do this by selecting the Users link and right clicking to select �New User� from the context menu.


Now I can configure this the way I want, to add new users. We are all set to move forward.


{ Read More }


Wednesday, 5 July 2017

Creating an Additional Site Location for IFC Export with Neutral Project Coordinates

Creating an Additional Site Location for IFC Export with Neutral Project Coordinates


When Revit exports to IFC, it typically uses the current Location (Survey Point) Shared Coordinates as Origin. You can observe this in the IFC file:

But what if you want to Export to IFC with Project coordinates (Revit origin), not Shared?

We want to do this because we have set up the import process from Tekla using this same Revit origin, here and particularly this:


1) Firstly, make a container RVT file with one Site Location, no shared coordinates. In other words, Project Base Point, Survey Point, and Revit Origin are all in one place.

2) Then, open the project you want to export, and link this container file Origin-to-Origin


3) Transfer Project Standards:

4) Choose the Link you made, and Project Info (only):

5) Choose New Only (this will just bring in the uniquely named project location from the link):

6) Open Location dialog in Revit, under Site you will notice a new "Site". Set it current with the Make Current button:

7) Now that the Project Origin (neutral coordinates) are set, you can export to IFC:

8) After Exporting, reset the coordinates back to what it was before with Make Current:

9) Optional: delete the IFC Export site definition if you dont need it anymore...

I previously posted about a similar method, but it was a bit destructive, whereas the above process can be implemented into a live project more easily:
What Revit Wants: When and how to neutralize Survey coordinates for IFC export from Revit

Further reading:
  • IFC Export with Shared or Project Coordinates using Revit 2011 - The Revit Clinic
  • Revit IFC Export Coordinates - Autodesk Community
  • IFC for Revit / Discussion / General Discussion:Shared Coordinates
  • 2013 How do I export to IFC with project coordinates and not real world coordinates? 
{ Read More }