This file contains hidden or 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
<iframe src="data:text/html;charset=utf-8,%3Cbody%3E%3Cscript%20src%3D%22https%3A%2F%2Fgist.github.com%2Fef4%2Ffe2e8e5b6e75266e3c2d.js%22%3E%3C%2Fscript%3E%3C%2Fbody%3E"> |
This file contains hidden or 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
Credit to : https://github.com/kingkool68/generate-ssl-certs-for-local-development | |
Here is the sample output after running the script: | |
sudo ./generate-ssl.sh local.dev | |
Password: | |
Generating RSA private key, 2048 bit long modulus | |
..........+++ | |
..............................................+++ |
When using the sparkline chart in angular-nvds we might want to hide the end value when creating tiny sparlines
Answer to this question https://stackoverflow.com/questions/34864193/angular-nvd3-sparkline-and-trailing-currentvalue-number/53314759#53314759
just set the undocumented* option showLastValue
`$scope.options = { chart: { type: 'sparklinePlus',
This file contains hidden or 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
{ | |
"type": "excalidraw", | |
"version": 2, | |
"source": "https://excalidraw.com", | |
"elements": [ | |
{ | |
"type": "rectangle", | |
"version": 192, | |
"versionNonce": 1899200910, | |
"isDeleted": false, |
This file contains hidden or 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
## Connect PG8000 to database | |
conn = pg8000.connect(database=args['db_name'],user=args['db_user'],password=args['db_password'],host=args['db_host'],port=5432) | |
cur = conn.cursor() | |
# ... | |
# Example upsert query | |
cur.execute("INSERT INTO {} SELECT * FROM {} ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name".format('campaigns', 'tmp_staging_campaings')) | |
# ... | |
conn.commit() | |
cur.close() | |
conn.close() |
This file contains hidden or 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 boto3 | |
import datetime | |
import json | |
from requests_aws4auth import AWS4Auth | |
import requests | |
boto3.setup_default_session(region_name='us-east-1') | |
identity = boto3.client('cognito-identity', region_name='us-east-1') | |
account_id='XXXXXXXXXXXXXXX' |
The package linked to from here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
This file contains hidden or 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
/** @OnlyCurrentDoc */ | |
const startDate = new Date("2021-06-16") | |
// so the first one is D2:K2 | |
function MarkEmptyCellsInYesterdayRowWithHyphen() { | |
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Group 2 - B"); | |
// Activates the sheet | |
SpreadsheetApp.setActiveSheet(sheet); | |
const today = new Date() |
From Gatsby docs
CodeSandbox uses the same URL compression schema used by the Babel REPL to embed the local code example in a URL.
This is than passed to the (awesome) define api to generate a sandbox on the fly.