Skip to content

Instantly share code, notes, and snippets.

View geo-stanciu's full-sized avatar

Geo Stanciu geo-stanciu

  • Bucharest, Romania
View GitHub Profile
@geo-stanciu
geo-stanciu / read_line.c
Last active November 26, 2021 12:28
[C] Read file line by line
/*
Copyright (c) 2012, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / SplitLargeTxt.java
Last active December 30, 2015 08:49
Split a large txt file in several files containing x lines in java 7
/*
Copyright (c) 2013, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / oracle - simple test case for RMAN backup and point in time recovery
Last active August 29, 2015 14:22
oracle - simple test case for RMAN backup and point in time recovery
/*
Copyright (c) 2015, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / oracle - check redo log switch frequency and increase the redo log file size
Created May 27, 2015 17:40
oracle - check redo log switch frequency and increase the redo log file size
/*
Copyright (c) 2015, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / Oracle monitor occupied space for each tablespace
Created May 27, 2015 17:41
Oracle monitor occupied space for each tablespace
/*
Copyright (c) 2015, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / Linux RMAN backup script
Created May 27, 2015 17:41
Linux RMAN backup script
/*
Copyright (c) 2015, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / Oracle Execution Plan
Created May 27, 2015 18:01
Oracle Execution Plan (explain plan)
/*
Copyright (c) 2015, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / EmailMessage.java
Last active January 5, 2016 14:45
java send mail
/*
Copyright (c) 2015, Gheorghita Stanciu gheorghita(dot)stanciu(at)gmail(dot)com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@geo-stanciu
geo-stanciu / conkyrc
Created February 16, 2016 21:23
Linux - conky config
# vim ~/.conkyrc
background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1
total_run_times 0
own_window yes
own_window_transparent yes
@geo-stanciu
geo-stanciu / SocketUtils.java
Created March 9, 2016 11:23
java - send and receive data from sockets
package org.geo.utils;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.nio.charset.StandardCharsets;
public class SocketUtils {