View application.cfc
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
this.datasource = 'appdsn_exactoritos'; | |
this.datasources["appdsn_exactoritos"] = getDatabaseConfig(); | |
private struct function getDatabaseConfig() { | |
var sys = CreateObject("java", "java.lang.System"); | |
var db_is_configured = sys.getProperty("com.app.db_is_configured"); | |
if( isNull( db_is_configured ) ) { | |
var aws = new modules.awscfml.aws(); |
View task.cfc
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
/** | |
* Scan all jars in folder recursivley for log4j vuln | |
*/ | |
component { | |
property name="progressableDownloader" inject="ProgressableDownloader"; | |
property name="progressBar" inject="ProgressBar"; | |
/** | |
* @scanPath absolute or relative path to folder to look for jars | |
*/ |
View hashify.cfm
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
<cfscript> | |
/* | |
Hashify | |
http://brianflove.com/2015/02/24/hash-any-coldfusion-type/ | |
*/ | |
private string function hashify(required any value) { | |
//return an empty string for null | |
if (IsNull(arguments.value)) { |
View server.js
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
const axios = require('axios'); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const app = express(); | |
const port = 3000; | |
// Enter the Page Access Token from the previous step | |
const FACEBOOK_PAGE_ACCESS_TOKEN = '_______________________________'; |
View PrettyJSON.py
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 | |
# A text filter for BBEdit. If it encounters a JSON error, it writes an error | |
# message to stderr (appears in a new BBEdit window) and leaves the original | |
# text unaltered. c.f. | |
# http://crisp.tumblr.com/post/2574967567/json-pretty-print-formatting-in-bbedit | |
# c.f. http://blog.scottlowe.org/2013/11/11/making-json-output-more-readable-with-bbedit/ | |
import json | |
import sys |
View RetryProxy.cfc
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
component | |
output = false | |
hint = "I provide automatic retry functionality around the target component." | |
{ | |
/** | |
* I initialize the retry proxy with the given target component. Retries will | |
* only be applied to "transient" errors. And, since the proxy doesn't know which | |
* errors are transient / retriable, it must check with the isTransientError() | |
* function. |
View fork forced sync
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 remote add upstream https://github.com/some_user/some_repo | |
git fetch upstream | |
git checkout master | |
git reset --hard upstream/master | |
git push origin master --force |
View app.e2e-spec.ts
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 { Test, TestingModule } from '@nestjs/testing' | |
import { INestApplication, LoggerService } from '@nestjs/common' | |
import * as request from 'supertest' | |
import { AppModule } from './../src/app.module' | |
class TestLogger implements LoggerService { | |
log(message: string) {} | |
error(message: string, trace: string) {} | |
warn(message: string) {} | |
debug(message: string) {} |
View 20190417131115_test-setup.ts
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 * as Knex from 'knex'; | |
export async function up(knex: Knex): Promise<any> { | |
return knex.schema.createTable('test_setup', (table: Knex.TableBuilder) => { | |
table.integer('foobar'); | |
}); | |
} | |
export async function down(knex: Knex): Promise<any> { | |
return knex.schema.dropTable('test_setup'); |
View SalesforceApiWrapper.cfc
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
component hint="wrapper for Salesforce REST 2.0 API" { | |
pageEncoding "utf-8"; | |
/** | |
Copyright (C) 2012 Daniel Watt | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
documentation files (the "Software"), to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, |
NewerOlder