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 ruby | |
# Generate a dbdiagram for dbdiagram.io from a dbt project. | |
# | |
# Usage: | |
# 1. Run `dbt docs generate` first. | |
# 2. Run `dbt_to_dbdiagram.rb` | |
# 3. Paste the output in https://dbdiagram.io/ | |
require 'yaml' | |
require 'json' |
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
More recent resolution: | |
1. cd ~/../../etc (go to etc folder in WSL). | |
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line). | |
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line). | |
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian). | |
5. cd ~/../../etc (go to etc folder in WSL). | |
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file). | |
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and | |
secondary. |
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
""" | |
Tools used to get workspace, dataset names and refresh datasets. | |
Power BI tools to refresh a dataset using client secret authentication. | |
Sample use (client id and secret values directly): | |
tenant_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
app_client_id = "XXXXXXXX-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
app_client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
app_scope = "https://analysis.windows.net/powerbi/api" |
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> | |
public array function queryToArray(query data) { | |
var local = {}; | |
local.Columns = ListToArray(arguments.Data.ColumnList); | |
local.QueryArray = ArrayNew(1); | |
for (local.RowIndex=1; local.RowIndex <= arguments.Data.RecordCount; local.RowIndex++) { | |
local.Row = {}; | |
for (local.ColumnIndex=1; local.ColumnIndex <= ArrayLen(local.Columns); local.ColumnIndex++) { | |
local.ColumnName = local.Columns[local.ColumnIndex]; | |
local.Row[local.ColumnName] = arguments.Data[local.ColumnName][local.RowIndex]; |
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
/*---------------------------------------------------------------------------------------- | |
Script: udf_convert_to_utf16.sql | |
Author: [Steve Withington](steve@digitalmine.com) | |
Dependencies: n/a | |
Purpose: MSSQL data is stored in UTF-16 format (UTF-8 support didn't roll out until SQL Server 2019) | |
Snowflake data is stored in UTF-8 format. | |
This function will convert a UTF-8 string to a UTF-16, MD5 string for comparison purposes | |
Note: You probably don't want to use this function directly. |
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> | |
// drop this in your Site or Theme eventHandler.cfc | |
public any function onRenderStart($) { | |
if ( $.event('showMeta') != 2 && $.content().getParent().getValue('type') != 'Folder' ) { | |
$.event('showMeta', 1); | |
} | |
} | |
</cfscript> |
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
Continent_Name | Continent_Code | Country_Name | Two_Letter_Country_Code | Three_Letter_Country_Code | Country_Number | |
---|---|---|---|---|---|---|
Asia | AS | Afghanistan, Islamic Republic of | AF | AFG | 4 | |
Europe | EU | Albania, Republic of | AL | ALB | 8 | |
Antarctica | AN | Antarctica (the territory South of 60 deg S) | AQ | ATA | 10 | |
Africa | AF | Algeria, People's Democratic Republic of | DZ | DZA | 12 | |
Oceania | OC | American Samoa | AS | ASM | 16 | |
Europe | EU | Andorra, Principality of | AD | AND | 20 | |
Africa | AF | Angola, Republic of | AO | AGO | 24 | |
North America | NA | Antigua and Barbuda | AG | ATG | 28 | |
Europe | EU | Azerbaijan, Republic of | AZ | AZE | 31 |
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
<!--- Drop this in your Site or Theme eventHandler.cfc ---> | |
<cffunction name="onAfterFormSubmitSave"> | |
<cfargument name="$"> | |
<cfset var msg = '' /> | |
<cfset var formBean = $.event().getValue('formBean') /> | |
<cfset var formResultBean = $.event().getValue('formDataBean') /> | |
<cfset var formResultStruct = $.event().getValue('formDataBean').getValue('formResult') /> | |
<cfif formBean.getTitle() eq 'Your Desired Form Title'> | |
<cfsavecontent variable="msg"> |
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> | |
param name='form.csvUrl' default='#getPageContext().getRequest().getScheme()#://#cgi.server_name##getDirectoryFromPath(getPageContext().getRequest().getRequestURI())#users.csv'; | |
param name='form.group' default='Temp'; | |
param name='form.isSubmitted' default='false'; | |
param name='form.isTest' default='true'; | |
param name='form.siteid' default='default'; | |
$ = application.serviceFactory.getBean('$').init(form.siteid); | |
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) { |
NewerOlder