As configured in my dotfiles.
start new:
tmux
start new with session name:
from collections import defaultdict | |
from telegram.ext import BasePersistence | |
from walrus import Walrus, Hash | |
class DefaultDataDict(defaultdict): | |
def __init__(self, redis: Walrus, prefix: str = None): | |
self.redis = redis | |
self.prefix = prefix or 'default_data_dict' |
As configured in my dotfiles.
start new:
tmux
start new with session name:
cd "C:%HOMEPATH%\.IntelliJIdea*\config" | |
rmdir "eval" /s /q | |
del "options\other.xml" | |
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f | |
:: This will work for idea 2018.3 and later | |
:: | |
:: It is Highly Advised to Purchase the JetBrain Softwares | |
:: This is only for the case You just want to Extend the | |
:: Trial Period and Evaluate the IDE for some more Time |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
#verify this is the console and not the ISE | |
Import-Module Get-ChildItemColor | |
Set-Alias l Get-ChildItemColor -option AllScope | |
Set-Alias ls Get-ChildItemColorFormatWide -option AllScope | |
function ll{ | |
return l | select Mode, @{Name="LastWriteTime"; Expression={$_.LastWriteTime.ToString("yyyy-MM-dd HH:mm")}}, @{Name='Size'; Expression={if ($_.Attributes -ne 'Directory') {$_.Length} else {''}}}, Name | |
} | |
Set-Alias dir Get-ChildItemColor -option AllScope -Force |
{ | |
"final_space": true, | |
"console_title": false, | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, | |
"segments": [ |
// Create a kaltura session (ks) using an app token in nodejs | |
// First install the Kaltura client library: npm install kaltura-client | |
// Details from your Kaltura account: partner id (pid), apptoken id, apptoken hash | |
const kaltura = require('kaltura-client'); | |
const client = new kaltura.Client(new kaltura.Configuration()); | |
let widgetId = "_YOUR-PID"; | |
let expiry = 86400; | |
var crypto = require('crypto'); |
$save_folder = "C:\Users\my_username\Pictures\Spotlight" | |
$saved_names = dir $save_folder | foreach Name | |
$spotlight_folder = $env:LOCALAPPDATA + "\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" | |
$spotlight_files = (dir $spotlight_folder) | |
foreach ($file in $spotlight_files) { | |
$saved_name = (Split-Path $file -Leaf) + ".jpg" | |
if ($saved_names -contains $saved_name) { | |
continue |