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
WITH compr_as AS ( | |
SELECT s as created | |
FROM generate_series( -- this would produce timestamps with 20 minutes step | |
(now() - '20 days'::interval)::date, | |
(now() + '20 days'::interval)::date, | |
'20 minutes'::interval) AS s | |
) | |
SELECT to_char( created, 'DY'::TEXT), created, | |
date_trunc('week', CURRENT_DATE - interval '1 week') as start_dt, | |
date_trunc('week', CURRENT_DATE) as end_dt |
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
# install xcode tools | |
xcode-select --install | |
# install homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew update | |
# update iterm2 settings, ohmyzsh | |
brew install --cask iterm2 | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
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
{"lastUpload":"2020-12-14T00:37:16.231Z","extensionVersion":"v3.4.3"} |
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
const DEFAULT_PROCESS_ASYNC = true; | |
// config.processAsync may be undefined but never null | |
const config = { | |
processAsync: undefined, | |
}; | |
// default value assignment | |
const { | |
processAsync = DEFAULT_PROCESS_ASYNC, |
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 bpy | |
import requests | |
import json | |
class GetOperator(bpy.types.Operator): | |
"""Tooltip""" | |
bl_idname = "object.get_operator" | |
bl_label = "Search" |
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
Commands | |
------------------------------- | |
:q exit if there are no changes | |
:q! exit without save | |
:wq,:x save and exit | |
:w save | |
u Undo last change | |
U undo all changes to the line |
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
netstat -a -n -o | findstr :3000 | |
TaskKill /PID <processID> /T /F |
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
// For converting javascript dates to string | |
ar formatedDateString = moment(date).format('YYYY-MM-DD'); |
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
//Git Mergetool and difftool with Beyond Compare 4 | |
//For Windows | |
//IF running this command in git bash then escape $ with \ | |
git config --global diff.tool bc4 | |
git config --global difftool.bc4.cmd "\"C:/Program Files (x86)/Beyond Compare 4/BCompare.exe\" \"\$LOCAL\" \"\$REMOTE\"" | |
git config --global difftool.prompt false | |
git config --global merge.tool bc4 | |
git config --global mergetool.bc4.cmd "\"C:/Program Files (x86)/Beyond Compare 4/BCompare.exe\" \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\"" | |
git config --global mergetool.bc4.trustExitCode true |
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
# For configuring OpenSSL | |
#1 | |
set OpenSSL_HOME=C:\OpenSSL | |
#2 | |
set OpenSSL_CONF=path-to-your-OpenSSL-installation\bin\openssl.cfg | |
#3 | |
set Path=%Path%;%OpenSSL_HOME%\bin | |
#For generating CSR | |
#1 Create a Private Key |