This file contains hidden or 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
#!/usr/bin/sh | |
filename=file.ogv | |
inputDir=~/Desktop/ | |
output=~/Desktop/${filename}.mp4 | |
input=${inputDir}/${filename} | |
mencoder $input -of lavf -lavfopts format=mp4 -oac mp3lame -lameopts cbr:br=128 -ovc x264 -x264encopts bitrate=1000 -o $output |
This file contains hidden or 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 shutil | |
import time | |
import os, sys, argparse | |
import fnmatch | |
import pystache | |
import json | |
localtime = time.localtime() | |
timeString = time.strftime("%Y%m%d%H%M%S", localtime) |
This file contains hidden or 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
{ | |
"hostname": "myhostName", | |
"IPaddr": "128.129.289.0" | |
} | |
==================== | |
import pystache | |
import json | |
renderer = pystache.Renderer() |
This file contains hidden or 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
// load and initialise first | |
$.getScript("../header.js", function() { | |
//main(); | |
json = $.parseJSON(getCookie('myHeader')); | |
userId = json.UserLogin; | |
userName = json.FullName.replace(/^.*,\s+/,"") + " " + json.FullName.replace(/,.*/,""); | |
if ( window.location.pathname == "/myModule/abc.html" ) { | |
$(".container h2").text("123 Role"); | |
pageRole="123"; |
This file contains hidden or 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).on({ | |
ajaxStart: function() { $body.addClass("loading"); }, | |
ajaxStop: function() { $body.removeClass("loading"); } | |
}); |
This file contains hidden or 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
# AIX | |
newUser="newXYZ" | |
extraGroupsToAdd="secondGroup,thirdGroup" # comma separated | |
gecosVal="SYS/someDetails.POC/newUser" | |
UID=215 # Put uid based on your system | |
mkuser id=${UID} pgrp=staff groups=staff,${extraGroupsToAdd} gecos="${gecosVal}" ${newUser} | |
# chgrpmem -m + ${newUser} <group> # adds a user to a group , or the - for removal | |
chuser maxage=0 ${newUser} | |
This file contains hidden or 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
ldapsearch -h yourserver.com -p 389 -b 'DC=dc,DC=com,DC=mycompany' -D "CN=userid,OU=org_unit,DC=dc,DC=com,DC=mycompany" -w 'xyz!' '(objectclass=*)' '*' | grep ^dn: | more |
This file contains hidden or 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
<iframe style="border: 1px solid #999;width: 100%; height: 300px" | |
src="http://embed.plnkr.co/xlGFOu2WfRGL1zJOtlu9" frameborder="0" | |
allowfullscreen="allowfullscreen"> | |
Loading plunk... | |
</iframe> |
This file contains hidden or 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
# Web Developers cannot live without "bootstrap", "JQuery" | |
# But on top of this there are some very good modules | |
################################################################################ | |
################################################################################ | |
################# T H E M E S ################# | |
################################################################################ | |
# Themes for Bootstrap | |
http://bootswatch.com |
This file contains hidden or 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
# Various Move/Copy commands with pipe operators | |
http://technet.microsoft.com/en-us/library/hh849852.aspx | |
#Move files | |
gci -af -rec | move-item -destination C:\Data\xyz\destinationDir | |
# find alternative | |
netstat -aon | select-string ":8089" | select-string "LISTENING" | |
# wmic |