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> | |
/// Publishes the content item with the provided ID | |
/// </summary> | |
/// <param name="id">The id identifying the item</param> | |
/// <returns></returns> | |
public async Task<int> PublishItem(string id) | |
{ | |
_logger.LogTrace($"PublishItem({id})"); | |
if (string.IsNullOrWhiteSpace(id)) |
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 AutoMapper; | |
using KT.Content.Data.Definition; | |
using KT.Content.Data.Exceptions; | |
using KT.Content.Data.Models; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Net.Http; |
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
#!/usr/bin/env python3 | |
import requests | |
import argparse | |
def retrieve_token(token_uri, client_id, client_secret): | |
r = requests.post(f"{token_uri}", | |
data={'client_id':f"{client_id}",'grant_type': 'client_credentials','client_secret': f"{client_id}", 'scope': 'targeting-api'}, | |
headers={'Content-Type':'application/x-www-form-urlencoded'}) |
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
s3_bucket = "demo.wtuo.com" | |
# report_folder = "s3_bucket/${env.BUILD_NUMBER}" | |
aws s3 cp dist/ "s3://${s3_bucket}" --recursive --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers |
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
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) |
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
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'America/New_York') |
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
if (id != base.UserID) | |
{ | |
var token = this.GetAccessToken().Result; | |
var currentUser = await _principal.Retrieve(this.User, token); | |
if (!currentUser.IsImpersonator || !currentUser.CanActAsStudent) { | |
return Unauthorized(); | |
} | |
} |
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
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch .vscode/launch.json' --prune-empty --tag-name-filter cat -- --all | |
git update-index --assume-unchanged FILENAME_TO_IGNORE |
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
""" | |
Retrieve & Decrypt settings from DDB. | |
Sample Usage: | |
foo=$(python settings.py decrypt <my-app> <my-config-value-name>) | |
echo $foo | |
foo=$(python settings.py settings <my-app>) | |
echo $foo | |
""" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.