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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 _array_to_csv_download($array, $filename = "export.csv", $delimiter=",") { | |
// open raw memory as file so no temp files needed, you might run out of memory though | |
$f = fopen('php://memory', 'w'); | |
// loop over the input array | |
foreach ($array as $line) { | |
// generate csv lines from the inner arrays | |
fputcsv($f, $line, $delimiter); | |
} | |
// reset the file pointer to the start of the file | |
fseek($f, 0); |
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
<?php | |
namespace app\exact; | |
use GuzzleHttp\Client; | |
class RawConnection extends \Picqer\Financials\Exact\Connection | |
{ | |
/** | |
* Gets XML for an division. |
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
<?xml version="1.0"?> | |
<columns code="100" optimize="true"> | |
<column id="1"> | |
<field>fin.trs.head.yearperiod</field> | |
<label>Periode</label> | |
<visible>true</visible> | |
<ask>true</ask> | |
<operator>between</operator> | |
<from></from> | |
<to></to> |
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
db.getCollectionNames().forEach( function(collection_name) { | |
if (collection_name.indexOf("system.") == -1) | |
db[collection_name].drop(); | |
else | |
db.collection_name.remove({}); | |
}); |
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
exports.handler = async (event, context, callback) => { | |
console.log('Starting the process'); | |
var AWS = require('aws-sdk'); | |
// set the service names | |
var ecsClusterName = "clustername"; | |
var ecsServiceName = "servicename"; | |
var autoScalingGroupName = "autoscalinggroupname"; |
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
files: | |
"/etc/filebeat/filebeat.yml": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
filebeat.inputs: | |
- type: log | |
enabled: true | |
paths: |
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 buildx build . --platform linux/amd64 --tag testcontainer | |
docker run --platform linux/amd64 -it testcontainer bash |
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
variable "prefix" { | |
type = string | |
} | |
variable "vpc_id" { | |
type = string | |
} | |
variable "private_subnets" { | |
type = list(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
variable "env_level" { | |
description = "Environment level" | |
default = "dev" | |
} | |
module "eventbridge_price" { | |
source = "terraform-aws-modules/eventbridge/aws" | |
create_bus = false | |
create_connections = true | |
create_api_destinations = true |