Skip to content

Instantly share code, notes, and snippets.

@dinnouti
dinnouti / GetItems.ps1
Created June 3, 2016 18:08
Read items from SharePoint Online in Powershell
#Sample provided As-Is – Use after sufficient testing.
#replace these details – User name, domain, Password. (Also consider using Get-Credential to enter password securely as script runs)
#Ensure there is a folder called C:\OUTPUT
#from https://blogs.technet.microsoft.com/sharepointrecipes/2015/06/17/code-sample-spo-dump-out-list-items-to-csv/
$username = "[email protected]"
$password = "pwd"
$url = "https://domain.sharepoint.com"
@dinnouti
dinnouti / gist:150bbfc9d5f80b7f2c0c
Last active August 29, 2015 14:14
Bookmark tools for SharePoint 2013, please copy and paste into the URL
** Site Content and Structure **
javascript:(function(){window.open(_spPageContextInfo.webAbsoluteUrl +'/_layouts/15/sitemanager.aspx','_blank');})();
** Site Settings **
javascript:(function(){window.open(_spPageContextInfo.webAbsoluteUrl + '/_layouts/settings.aspx','_blank');})();
** Site contents **
javascript:(function(){window.open(_spPageContextInfo.webAbsoluteUrl +'/_layouts/15/viewlsts.aspx','_blank');})();
<script src='https://code.jquery.com/jquery-1.11.1.min.js'></script>
<script>
function getjs(){
$.getJSON("hashtag.json", function(data) {
console.log(data.total); // this will show the info it in firebug console
});
}
</script>
<button onclick="getjs()">Test</button>
@dinnouti
dinnouti / conkyrc
Last active August 29, 2015 14:02
conky file for linux mint
alignment top_right
background no
border_width 1
cpu_avg_samples 2
default_color cornflowerblue
default_outline_color white
default_shade_color white
draw_borders no
@dinnouti
dinnouti / bookmark.json
Last active December 23, 2015 15:19
Chrome Extension to show company bookmarks Notes: - Stores the bookmarks in the local browser database, until the cache expires in the cacheTimeout (in seconds) - Todo: use the json file to create the tabs automatically instead of hard code in the html
bookmark({
"cacheTimeout" : "3600",
"tools": [
{ "vpn": false, "title": "ABC1" , "url": "http://example1.com" },
{ "vpn": false, "title": "ABC2" , "url": "http://example2.com" }
],
"sites": [
{ "vpn": false, "title": "ABC3" , "url": "http://example3.com" },
{ "vpn": true, "title": "ABC4" , "url": "http://example4.com" }
@dinnouti
dinnouti / photo.html
Created September 14, 2013 15:16
jQuery Shadowbox and Photo Library
<!-- script begin -->
<script type="text/javascript" src="/_layouts/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/_layouts/js/shadowbox/shadowbox.js"></script>
<link rel="stylesheet" type="text/css" href="/_layouts/js/shadowbox/shadowbox.css">
<script type="text/javascript">
Shadowbox.init({
language: 'en',
players: ['img','swf','flv']
});
@dinnouti
dinnouti / loadPointsFromFirms.ini
Created September 14, 2013 15:00
Load points from NASA FIRMS into a SQL Database via ArcGIS 10.2. NASA only keeps 15 days of FIRMS data hence the reason to keep the CSV file.
; configuration file
[test]
logging_file = D:/firecast_data/script_logs/firms_log.txt
;1 = file , 2 = stdout
logging_streaming = 1
; ftp information
ftp_host = <ftp host address>
@dinnouti
dinnouti / index.html.erb
Created June 6, 2013 11:42
Adding state_machine events to link_to
enable: <%= link_to 'Enable', user_update_state_path(user.id, state_event: 'register', access_state_event: 'enable') %><br>
disable: <%= link_to 'disable', user_update_state_path(user.id, state_event: 'unregister', access_state_event: 'disable') %>
var mediaType = "ED"; // ED for streaming; 1 for DVD
var lxMovies = new Array();
function lxMovie(title, starRating, id) {
this.title = title;
this.starRating = starRating;
this.id = id;
}
@dinnouti
dinnouti / gist:5204483
Created March 20, 2013 13:05
bring empty records in a report builder query
-- lookup query
select
-1 as country_work_impact_id,
'[any]' as country_work_impact_name
union all
SELECT DISTINCT
country_work_impact_id,
country_work_impact_name
FROM V_Matrix_FY14_Aggregate