Skip to content

Instantly share code, notes, and snippets.

View sayham-sjb's full-sized avatar
🌐
^-^

Sayham Chowdhury sayham-sjb

🌐
^-^
View GitHub Profile
@sayham-sjb
sayham-sjb / PermissionToTheSuperUser.md
Last active March 28, 2018 16:51
PermissionToTheSuperUser #md

Give yourself the right to execute the file. The following command as super user works.

sudo chmod 755 'FileName'

@sayham-sjb
sayham-sjb / RemoveRestoringStateFromDB.sql
Last active February 12, 2019 00:44
RemoveRestoringStateFromDB #sql
--The following command will take a database that is in the "restoring" state
--and make it available for end users.
--If the DB is awaiting a log restore that could result in considerable data loss
RESTORE DATABASE {DB Name} WITH RECOVERY
GO
@sayham-sjb
sayham-sjb / CommandAsSuperUser.md
Last active April 16, 2019 19:30
CommandAsSuperUser #sudo

% Give yourself the rights to execute a script...

sudo chmod 755 'ScriptName'

@sayham-sjb
sayham-sjb / JavaScriptBasicCalculatorExample.js
Last active March 8, 2018 20:50
JavaScriptBasicCalculator #VS #js
var accumulator = 0.0;
var lstEntr = 0.0;
var deciPnt = 0;
var sign = 1;
var lstKey = "equals";
var clcTsk = "equals";
function Adddigit(digit) {
var temp;
if (lstKey != "digit") {
@sayham-sjb
sayham-sjb / ScrollbarStyle.css
Last active February 19, 2018 04:55
ScrollbarStyle #css #VS
/*Scrollbar style */
::-webkit-scrollbar {width: 11px;height: auto;}
::-webkit-scrollbar-track {border-radius: 10px;box-shadow: inset 0 0 8px #00B141;}
::-webkit-scrollbar-thumb {background: teal;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0,0,0,0.5); }
::-webkit-scrollbar-thumb:hover {background: green;}
::-webkit-scrollbar-thumb:active {background: red;}
/*Scrollbar style */
@sayham-sjb
sayham-sjb / StyleOddOrEvenDIVUsingjQuery.js
Created February 17, 2018 07:41
StyleOddOrEvenDIVUsingjQuery #js #VS
$(document).ready(function(){
$("#rstODD").click(function() {
$(".oddDiv").css("color", "lime");
$(".oddDiv").css("background-color", "teal");
});
$('#rstEVEN').click(function() {
$('.evenDiv').css('color', 'red');
$('.evenDiv').css('background-color', 'blue');
});
$('#rstALL').click(function() {
@sayham-sjb
sayham-sjb / RemoveSingleUserMode.sql
Last active February 16, 2018 13:38
RemoveSingleUserMode #sql
-- Start in master USE MASTER; ALTER DATABASE [DB Name] SET MULTI_USER GO
@sayham-sjb
sayham-sjb / ListAllPages_VS.js
Last active January 25, 2018 16:35
ListAllFiles #js #VS
<script type="text/javascript">
function loadtoc(e){!function(){if("entry"in e.feed){var t=e.feed.entry.length;numberfeed=t,ii=0;for(var r=0;r<t;r++){for(var n,o=e.feed.entry[r],a=o.title.$t,s=o.published.$t.substring(0,10),i=o.published.$t.substring(5,7),l=o.published.$t.substring(8,10),p=month2[parseInt(i,10)-1]+" "+o.published.$t.substring(0,4),u="/"+o.published.$t.substring(0,4)+"_"+i+"_01_archive.html",h=0;h<o.link.length;h++)if("alternate"==o.link[h].rel){n=o.link[h].href;break}for(h=0;h<o.link.length;h++)if("enclosure"==o.link[h].rel){o.link[h].href;break}postTitle.push(a),postDate.push(s),postUrl.push(n),postYearMonth.push(p),postYearMonth2.push(u),postTanggal.push(l)}}}(),displayToc2(),
document.write('<br/><a href="http://feeds2.feedburner.com/virtualspecies" target="_Blank" style="font-size: 10pt; text-decoration:none; color: lightslategray; float:right;border:1pt solid darkolivegreen;padding:5px;border-radius:5px;">Subscribe to RSS Feed.</a></br/>')}function displayToc2(){for(var e=0,t=0;t<postTit
@sayham-sjb
sayham-sjb / AtomStyleDarkUI.less
Last active January 25, 2018 16:35
AtomStyleDarkUI #less
/*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*/
/* style the background color of the tree view */
.tree-view {
background-color: black;
}
@sayham-sjb
sayham-sjb / ssb-interop.js
Last active February 20, 2018 02:50
SlackThemeChange #js
//To modify slack theme, append the following to
///usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'Enter your CSS url',
success: function(css) {
$("<style></style>").appendTo('head').html(css);
}
});
});