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 org.apache.pdfbox.pdmodel.PDDocument; | |
import org.apache.pdfbox.pdmodel.PDPage; | |
import org.apache.pdfbox.pdmodel.PDPageContentStream; | |
import org.apache.pdfbox.pdmodel.common.PDRectangle; | |
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; |
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.mmdemirbas.lab; | |
/** | |
* Created by md on 5.04.2016. | |
*/ | |
import javafx.application.Application; | |
import javafx.application.Platform; | |
import javafx.collections.FXCollections; | |
import javafx.collections.ObservableList; |
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 org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.text.MessageFormat; | |
/** | |
* Contains methods to access and manipulate logback framework dynamically at run-time. Here 'dynamically' means without | |
* referencing the logback JAR, but using it if found in the classpath. |
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
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main" trace="disable"> | |
<in> | |
<log level="headers"> | |
<property name="?" value="[main] in: started"/> | |
<property name="To" expression="get-property('To')"/> | |
<property name="PAYLOAD" expression="/*"/> | |
</log> | |
<script language="js"><![CDATA[ | |
mc.setPayloadXML(<greeting>Hello World</greeting>); | |
]]></script> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main" trace="disable"> | |
<in> | |
<log level="headers"> | |
<property name="?" value="[main] in: started"/> | |
<property xmlns:ns="http://org.apache.synapse/xsd" | |
name="To" | |
expression="get-property('To')"/> | |
<property xmlns:ns="http://org.apache.synapse/xsd" name="PAYLOAD" expression="/*"/> | |
</log> |
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
######################################################################### | |
# # | |
# Script to check battery state periodically and alert if it is # | |
# going to outside of the desired range (%40-%80) by default. # | |
# # | |
# Usage: # | |
# # | |
# # To alert if x<=40 or x>=80, and check each 15 sec # | |
# # | |
# .\battery.ps1 40 80 15 # |
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
######################################################################### | |
# # | |
# Script to set or clear read-only flag of an NTFS volume. # | |
# # | |
# Usage: .\set-ntfs-ro.ps1 set "MY DISK LABEL" # | |
# .\set-ntfs-ro.ps1 clear "MY DISK LABEL" # | |
# # | |
# Author: Muhammed Demirbas, mmdemirbas at gmail dot com # | |
# Date : 2013-03-23 # | |
# # |
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
@echo off | |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: | |
:: This script executes given command repeatedly. | |
:: Waits specified amount of time between two executions. | |
:: First parameter MUST be sleep time. | |
:: Rest of the parameters will be executed as a command. | |
:: This script relies on sleep command from GnuWin32 package. | |
:: |
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
# @author: mmdemirbas@gmail.com | |
filename=/etc/default/grub | |
# Replace GRUB_DEFAULT value to 'saved' | |
echo :: Setting GRUB_DEFAULT=saved | |
sudo sed -i 's/GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/g' $filename | |
# Append GRUB_SAVEDEFAULT=true after deleting old GRUB_SAVEDEFAULT's | |
echo :: Setting GRUB_SAVEDEFAULT=true |
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
:: usage: | |
:: beep -- beeps immediately | |
:: beep 1 -- beeps after 1 sec | |
:: beep 1:2 -- beeps after 1 min, 2 sec | |
:: beep 1:2:3 -- beeps after 1 hour, 2 min, 3 sec | |
:: beep 1:2:3:4 -- beeps after 1 day, 2 hours, 3 min, 4 sec | |
:: | |
:: invalid usages: | |
:: beep 1::2 | |
:: beep :1 |
NewerOlder