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
import fetch from "node-fetch"; | |
// env vars | |
const apiUser = "apiuser"; | |
const apiPass = "pass"; | |
const baseUrl = "https://example.org/jsonapi"; | |
const auth = "Basic " + Buffer.from(`${apiUser}:${apiPass}`).toString("base64"); | |
/* This snippet: |
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
wget -m -nd [email protected] "ftp://ftp.box.com/file*.jpg" --ask-password |
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
Just an example of running an ssh command on a remote server. | |
PK file needs to come from somewhere -- I think ideally Secret Vault but also base64 encoded secret would be a good choice. | |
Library used is https://www.nuget.org/packages/SSH.NET |
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
import arcpy | |
import pandas as pd | |
import os | |
import re | |
homepath=r"C:\Users\postit\Downloads\testing" | |
output_path = os.path.join(homepath,"features") | |
arcpy.env.workspace = output_path | |
if not os.path.exists(output_path): |
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
.AddCookie(cookies => | |
{ | |
cookies.Events.OnRedirectToAccessDenied = ctx => | |
{ | |
if (ctx.Request.Path.StartsWithSegments("/api")) | |
{ | |
ctx.Response.StatusCode = (int)HttpStatusCode.Forbidden; | |
return Task.CompletedTask; | |
} | |
return cookies.Events.OnRedirectToAccessDenied(ctx); |
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
BEGIN | |
FOR i IN (SELECT DUPPIDM as pidm FROM MIGRATEPIDMS) LOOP | |
declare | |
P_APPL_NO_OUT NUMBER; | |
term NUMBER; | |
num_apps NUMBER; | |
begin | |
select count(*) into num_apps from saradap where saradap_pidm = i.pidm; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. | |
Please check the code for the HelloWorld component. |
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
// Main Type of the context | |
export interface ProviderContext { | |
name: String; | |
} | |
// Provider | |
export default class App extends React.Component<{}, {}> { | |
static childContextTypes = { | |
name: PropTypes.string | |
} |
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.Linq; | |
using System.Net; | |
using System.Web; | |
using System.Web.Configuration; | |
using System.Web.Http; | |
using System.Web.Http.Controllers; | |
namespace GivingService.Attributes | |
{ |
NewerOlder