RSA public/private keys in YAML

You can store your keys as text (“ASCII-armored” / base 64 encoded). From Wikipedia, the syntax for multiline strings in YAML is: – title: An example multi-line string in YAML body : | This is a multi-line string. “special” metacharacters may appear here. The extent of this string is indicated by indentation.

Merging two CSV files using Python

When I’m working with csv files, I often use the pandas library. It makes things like this very easy. For example: import pandas as pd a = pd.read_csv(“filea.csv”) b = pd.read_csv(“fileb.csv”) b = b.dropna(axis=1) merged = a.merge(b, on=’title’) merged.to_csv(“output.csv”, index=False) Some explanation follows. First, we read in the csv files: >>> a = pd.read_csv(“filea.csv”) >>> … Read more

Keylistener in Javascript

Here’s an update for modern browsers in 2019 let playerSpriteX = 0; document.addEventListener(‘keyup’, (e) => { if (e.code === “ArrowUp”) playerSpriteX += 10 else if (e.code === “ArrowDown”) playerSpriteX -= 10 document.getElementById(‘test’).innerHTML = ‘playerSpriteX = ‘ + playerSpriteX; }); Click on this window to focus it, and hit keys up and down <br><br><br> <div id=”test”>playerSpriteX … Read more

reactjs Cannot read property ‘keys’ of undefined

Edit: oddly, after our comments above, I checked to see if it was indeed the babel core version, I am using this one in my fiddle: https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js The second I switch to your version above I get this: Uncaught TypeError: Cannot read property ‘keys’ of undefined Use React.createClass not ReactDOM.createClass and wrap multiple lines of … Read more

update dictionary with dynamic keys and values in python

Remove the following line: mydic = {i : o[“name”]} and add the following before your loop: mydic = {} Otherwise you’re creating a brand new one-element dictionary on every iteration. Also, the following: mydic.update({i : o[“name”]}) is more concisely written as mydic[i] = o[“name”] Finally, note that the entire loop can be rewritten as a … Read more

Pattern matching field names with jq

Your statement does not work, because you try to feed the data object into match, but match can only work on strings. The following expression will do what you want. The to_entries converts the object to an array of keys and values. Then we iterate over this array by using map and select all entries … Read more

How to store SSH host key in IntelliJ IDEA

I just had the same problem with IDEA 13 on Win7, and it was solved by switching to “Native” SSH executable in the Git Settings page. I did that while running Intellij as administrator as suggested by the accepted answer, but the accepted answer didn’t fix the problem until I changed the SSH executable.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)