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
| # Source: https://coderwall.com/p/euwpig/a-better-git-log | |
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
| # Source: http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/ | |
| git config --global alias.ll "log --pretty=format:\"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --numstat" | |
| git config --global alias.s "status --short" |
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
| call plug#begin('~/.vim/plugged') | |
| Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
| Plug 'terryma/vim-multiple-cursors' | |
| " Plug 'davidhalter/jedi-vim' | |
| " Plug 'nvie/vim-flake8' | |
| call plug#end() | |
| " indent using four spaces | |
| set expandtab | |
| set tabstop=4 |
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
| Write-Host '*************************************' | |
| Write-Host 'Change Subscription Owner starting...' | |
| Write-Host '*************************************' | |
| $oldOwner = "domain\user1" | |
| Write-Host "Old Owner = $oldOwner" | |
| $newOwner = "domain\user2" | |
| Write-Host "New Owner = $newOwner" | |
| $itemPathOrSiteURL = "http://servername/sites/subsite" | |
| Write-Host "Item Path or Site URL = $itemPathOrSiteURL" | |
| $reportServerUri = "http://servername/_vti_bin/ReportServer/ReportService2010.asmx?wsdl" |
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
| <script src="/kitsite/Files/jquery-1.11.0.min.js"></script> | |
| <script src="/kitsite/Files/sputility.min.js"></script> | |
| <script> | |
| // url parsing from http://stackoverflow.com/a/2880929/98933 | |
| var urlParams; | |
| (window.onpopstate = function () { | |
| var match, | |
| pl = /\+/g, // Regex for replacing addition symbol with a space | |
| search = /([^&=]+)=?([^&]*)/g, | |
| decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }, |
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
| string itemPath = "http://servername/sites/reporting/Report Library/My_Report.rdl"; | |
| string dataSourceName = "Datasource1"; | |
| DataSource[] dsarray = new DataSource[1]; | |
| DataSourceReference reference = new DataSourceReference(); | |
| reference.Reference = "http://servername/sites/reporting/Data Sources/DATA_SOURCE_NET.rsds"; | |
| dsarray[0] = new DataSource(); | |
| dsarray[0].Name = dataSourceName; | |
| dsarray[0].Item = reference; |
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
| $.ajax({ | |
| dataType: "json", | |
| accepts: { "json":"application/json;odata=verbose"}, | |
| url: "/timetracking/_api/web/lists/getByTitle('Timesheet Entries')/items" | |
| }); |
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
| package main | |
| import ( | |
| "bytes" | |
| "flag" | |
| "fmt" | |
| "math/rand" | |
| "os" | |
| "time" | |
| "net" |
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
| ko.validation.rules['multiemail'] = { | |
| validator: function (val, validate) { | |
| if (!validate) { return true; } | |
| var isValid = true; | |
| if (!ko.validation.utils.isEmptyVal(val)) { | |
| // use the required: true property if you don't want to accept empty values | |
| var values = val.split(';'); | |
| $(values).each(function (index) { | |
| isValid = ko.validation.rules['email'].validator($.trim(this), validate); |
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
| <script type="text/javascript"> | |
| function CustomExecuteFunction() { | |
| var self = this; | |
| self.context = new SP.ClientContext.get_current(); | |
| self.web = context.get_web(); | |
| self.currentUser = web.get_currentUser(); | |
| context.load(self.currentUser); | |
| self.asyncSuccess = function(sender, args) { | |
| var user = this.currentUser; |
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
| private static AdmAuthentication _admAuth = new AdmAuthentication(AdmConstants.CLIENT_ID, AdmConstants.CLIENT_SECRET); | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| txtAuthToken.Text = _admAuth.GetAccessToken().access_token; | |
| txtAuthExpires.Text = _admAuth.GetAccessToken().expires_in; | |
| } |