Skip to content

Instantly share code, notes, and snippets.

View mutuadavid93's full-sized avatar
🎯
Focusing

David Mutua mutuadavid93

🎯
Focusing
  • Squad Africa
  • NAIROBI
View GitHub Profile
## Tweak bootstrap by directly editing the bootstrap files hosted on github
//Declare your variables
var gulp = require('gulp'),
estream = require('event-stream'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
connect = require('gulp-connect'),
less = require('gulp-less'),
htmlMin = require('gulp-htmlmin'),
<header>
<div class="navbar-header">
<a href="#" class="navbar-brand">Brand</a>
</div>
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
/*
Brand SharePoint by not editing
the masterpage.
Meant to Brand a SharePoint 2013
Blog site template.
*/
$(document).ready(function () {
var target = $(this);
/*
* Demonstarting function callbacks
*/
function foo(Goon) {
console.warn("Hello from: "+Goon);
}
function galon(company){
console.log("Greatings from: "+company);
}
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
gulpif = require('gulp-if'),
gutil = require('gulp-util'),
browserify = require('gulp-browserify'),
compass = require('gulp-compass'),
htmlmin = require('gulp-htmlmin'),
cssmin = require('gulp-minify-css'),
connect = require('gulp-connect');
// Add data into a list using CSOM
function apbObjectivesSection() {
alert("We are in the first function");
var currentCrx = SP.ClientContext.get_current();
var web = currentCrx.get_web();
try {
var list = web.get_lists().getByTitle("MyObjectives");
var itemInfoObj = new SP.ListItemCreationInformation();
// How to Create a React Sub Component
a. Create File
b. Import React Library
c. Use createClass() to Define the Component
d. Export Component
var React = require('react'),
// ## Add a ScrollBar to a Page using jQuery
// ## Add a ScrollBar to an Element using jQuery
// ## Add a ScrollBar to a Div using javascript
// ## Add a ScrollBar to a SharePoint Master Pages using jQuery
// ## START Adding a ScrollBar on PAGE
// Get the Open Window Height then Compare it to Parent Div height
if ($('div#ms-designer-ribbon').html()) {
//Don't Show ScrollBar
NB: The SiteCollection is Created automatically. If you try to make the collection first
an Exception will be thrown; "The Site Collection Already Exists".
NB: You don't need the -HostHeaderWebApplication parameter if the site being restored, share
the same name as the web application.
### Backup
Backup-SPSite http://s-hqs-spdev/sites/branding/ -Path C:\COLLECTIONS\Branding.bak –UseSqlSnapshot
// Dynamic Image Slider for SharePoint
// Image Carousel
// SharePoint Image Slider
$(document).ready(function () {
// ### Fecth Data from The List
var resourcez = "/_api/web/lists/GetByTitle('SlideMagic')/items?$select=Title,EncodedAbsUrl,Description,Alive";
//var eureka = "$top=3";
var orient = "$orderby=Created desc";