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
#!/bin/bash | |
currentDate=`date +%F` # Gets current day in full formate | |
outputName="configBackup-$currentDate"; # Sets the output file name | |
tmp="/tmp"; # Sets temp folder location | |
randStr=`</dev/urandom tr -dc A-Za-z0-9 | head -c8`; # Stores a random string of letters and numbers of 8 characters in length | |
tmpFullDirName=$tmp/"configBackup-$randStr" # Sets the name of temporal folder from where the script will work | |
backupTargetDir=$tmpFullDirName; # Sets the temporal folder that we'll backup, this is the full previous variable | |
workingDir=`pwd` # Gets the folder path from where we ran the script | |
folderList=`ls -l | egrep '^d' | awk '{ print $9 }'` |
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
################################################################################ | |
############################# Monit control file ############################# | |
################################################################################ | |
## | |
# | |
# Comments begin with a '#' and extend through the end of the line. Keywords | |
# are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
# |
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
#!/bin/bash | |
# ==================== IMPORTANT ====================== | |
# This script is esential for fog functionality, if its deleted | |
# of modified and no longer working fog WONT be able fo start any | |
# kind of tasks that involve backup or restores bear in mind | |
# that removing or modifing this file may disable FOG system | |
# entirely be careful!!!! | |
# ==================== IMPORTANT ====================== |
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
#!gpxe | |
dhcp net0 | |
set filename pxelinux.0 | |
set next-server fog.server.ip.address | |
set 210:string http://fog.server.ip.address/fogimg/ | |
imgfetch pxelinux.0 | |
imgload pxelinux.0 | |
boot pxelinux.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
#!/bin/bash | |
# | |
# This scripts check if user has a proper .forward file | |
# if not present script will ask for mail and finger info | |
# on login given is on proper login folder | |
# | |
#Get user data | |
username=`whoami` |
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
#!/bin/bash | |
################################################################## | |
## ## | |
## backupCron shell script v0.2, tested on RHEL 5 ## | |
## Jorge A. Moreno [email protected] ## | |
## November 2011 Backup Bash Shell Script ## | |
## ## | |
## Use script to backup your server using tar/gzip ## | |
## The script can copy the backup to a SMB share on ## |
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
/// <summary> | |
/// Gets the Maximum Length of a column table in Entity Framework 5 | |
/// Original from SO: | |
/// http://stackoverflow.com/questions/12378186/entity-framework-5-maxlength/12964634#12964634 | |
/// You need to add a reference to System.Linq.Expressions | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="column"></param> | |
/// <returns></returns> | |
public static int GetColumnMaxLength<T>(Expression<Func<T, string>> column) |
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
$(document).ready(function () { | |
$('#MainContent_InsertButton').click(function (e) { | |
// first we must stop the postback to show this confirmation | |
e.preventDefault(); | |
noty({ | |
text: 'Insert this data to system?', | |
buttons: [ | |
{ addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) { | |
// this = button element |
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
public class BasePage : System.Web.UI.Page | |
{ | |
/// <summary> | |
/// Creates an instance of a Base Page | |
/// </summary> | |
public BasePage() | |
{ | |
//some init logic if you want =P | |
} | |
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
#!/bin/bash | |
### Author: Benedykt 'b3niup' Przybyło | |
USAGE="Usage: ./$0 [options as for regular cp]" | |
#*****************************************************************************# | |
#** Helpers **# |
OlderNewer