This file contains 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
function DeleteListItems{ | |
<# | |
.SYNOPSIS | |
Deletes SharePoint List Items in batch | |
.DESCRIPTION | |
Deleted SharePoint List items in batch and provide sleep between batch. By default, it will delete all List Items. | |
You can delete List Items based on the CAML Query input parameter. | |
.PARAMETER ListUrl |
This file contains 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
///<summary> | |
/// ServiceClient Base Extensions | |
/// Author: Riwut Libinuko | |
/// Created Date: 29/12/2015 | |
/// Website : http://blog.libinuko.com | |
/// Copyright(c) 2015 | |
/// Use PostFilesWithRequest<TResponse>(...) , to POST metadata and multiple files attachment in single request | |
///</summary> | |
public static class ServiceClientBaseExtensions | |
{ |
This file contains 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
///<summary> | |
///When POSTing using PostFilesWithRequest, each individual files posted must bring metadata. So that the class can craete multipart request. | |
///</summary> | |
public class FileStreamInfo | |
{ | |
public Stream InputStream { get; set; } | |
public string Filename { get; set; } | |
} |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.IO; | |
using System.Reflection; | |
using System.Text; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace webnetconf.website.Helpers |
This file contains 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
REM Remove folder Sample/packages from GIT repository | |
git --filter-branch --index-filter "git rm --cached --ignore-unmatch -rf Sample/package" --prune-empty --tag-name-filter cat -- --all | |
REM Remove file Sample/packages/filetoremove.txt from GIT repository | |
git --filter-branch --index-filter "git rm --cached --ignore-unmatch Sample/package/filetoremove.txt" --prune-empty --tag-name-filter cat -- --all | |
REM push the result to origin | |
git push origin --force --all | |
git push origin --force --tags |
This file contains 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
REM rename branch in local | |
git branch -m old_branch new_branch | |
REM delete old branch in ORIGIN | |
git push origin :old_branch | |
REM set new branch to track ORIGIN | |
git push --set-upstream origin new_branch | |
REM re-sync remote branch to local, removing deleted remote | |
git fetch origin --prune |
This file contains 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
/* 1 */ | |
{ | |
"_id" : "joe", | |
"name" : "Joe Bookreader", | |
"addresses" : [ | |
{ | |
"street" : "123 Fake Street", | |
"city" : "Faketon", | |
"state" : "MA", | |
"zip" : "12345" |
This file contains 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
# Defines date range of the news | |
$startDate = Get-Date "2016-01-01" | |
$endDate = Get-Date | |
# Defines file capture location | |
$fileCapture = "C:\temp\detik.txt" | |
$detikApi = "http://apis.detik.com/v1/indeks?limit=500&channelid=10>={0:yyyy-MM-dd HH:mm:ss}<={1:yyyy-MM-dd HH:mm:ss}" | |
$currentDate = $startDate | |
do { | |
$nextDate = $currentDate.AddMonths(1) |
This file contains 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
# Defines file capture location | |
$fileCapture = "C:\temp\detik.txt" | |
# List of target RSS - you can add more | |
$targetRSS = "detikcom_nasional", "detikcom_internasional", "detikcom_bbc","detikcom_lapsus","detikcom_wawancara"," detikcom_prokontra" | |
$targetRSS |% { | |
$url = "http://rss.detik.com/index.php/" + $_ | |
$targetXml = "C:\temp\" + $_ + ".xml" | |
Invoke-WebRequest -Uri $url -OutFile $targetXml -ErrorAction Stop |
This file contains 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
<configuration> | |
<system.serviceModel> | |
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> | |
</system.serviceModel> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="ReverseProxy" stopProcessing="true"> | |
<match url=".*" /> |
OlderNewer