Skip to content

Instantly share code, notes, and snippets.

View princeppy's full-sized avatar

👑 Prince Park 👑 princeppy

View GitHub Profile
@princeppy
princeppy / gulpfile.js
Created July 28, 2018 09:21
gulpfile with browsersync and deploying
'use strict';
var gulp = require('gulp');
var ftp = require('vinyl-ftp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync').create();
var insertLines = require('gulp-insert-lines');
var baseDir = './src/';
var rmteDir = '/public_html';
@princeppy
princeppy / gist:efd481a30c182b5cc2156fb1e9081b34
Created July 28, 2018 09:21 — forked from feliperoberto/gist:9793674
GulpJS + SASS + BrowserSync ftw

#GulpJS + SASS + BrowserSync ftw Being the new-kid-on-the-block, GulpJS is getting plently of attention lately. Instead of contributing to the pool of opinion-pieces out there though, I thought I'd walk you through setting it up with a really nice little workflow including SASS for CSS along with my open-source project, BrowserSync.io.

The end result will be a pretty sweet front-end development setup including:

  • SCSS File watching/compilation.
  • Live CSS injecting into multiple devices.
  • A Server running on an IP address that can be accessed on multiple devices/screens.
  • Syncronized scroll, clicks, links & form fields across all devices.
@princeppy
princeppy / gulpfile.js
Created July 28, 2018 09:21 — forked from glebcha/gulpfile.js
Gulp task with Less processing (autoprefixer), live reload (browser-sync), javascript (es6, babelify, react), error handling, images optimization, jade templates
'use strict';
/*
Instructions:
1 - Should execute 'npm run prepare'
before the very first run, it will install and symlink all dependencies.
2 - Choose between production 'npm start' and development 'npm run start-dev' modes
(watcher will run immediately after initial run).
@princeppy
princeppy / storeImgInMongoWithMongoose.js
Created July 28, 2018 09:12 — forked from aheckmann/storeImgInMongoWithMongoose.js
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
@princeppy
princeppy / TermGroupManagersContributors.cs
Created July 18, 2018 13:43 — forked from vman/TermGroupManagersContributors.cs
SharePoint Online: Add TermStore Managers and Contributors using CSOM
ClientContext clientContext = GetClientContext();
var taxonomySession = TaxonomySession.GetTaxonomySession(clientContext);
var termStore = taxonomySession.GetDefaultSiteCollectionTermStore();
var myTermGroup = termStore.Groups.GetByName("My Custom Terms Group");
//Add Group Managers
myTermGroup.AddGroupManager("i:0#.f|membership|[email protected]");
$(document).ready(function(){
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js",
function () {
$.getScript(scriptbase + "SP.js", function(){
$.getScript(scriptbase + "SP.Taxonomy.js", execOperation);
$(document).ready(function(){
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js",
function () {
$.getScript(scriptbase + "SP.js", function(){
$.getScript(scriptbase + "SP.Taxonomy.js", execOperation);
$(document).ready(function(){
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js",
function () {
$.getScript(scriptbase + "SP.js", function(){
$.getScript(scriptbase + "SP.Taxonomy.js", execOperation);
$(document).ready(function(){
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js",
function () {
$.getScript(scriptbase + "SP.js", function(){
$.getScript(scriptbase + "SP.Taxonomy.js", execOperation);
$(document).ready(function(){
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js",
function () {
$.getScript(scriptbase + "SP.js", function(){
$.getScript(scriptbase + "SP.Taxonomy.js", execOperation);