The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
"Run git clone using pki key with passphrase." | |
import pty, os, sys, select | |
def waitfor(fd, str): | |
"poll the child for input" | |
poll = select.poll() | |
poll.register(fd, select.POLLIN) | |
while True: |
/* | |
Serve is a very simple static file server in go | |
Usage: | |
-p="8100": port to serve on | |
-d=".": the directory of static files to host | |
Navigating to http://localhost:8100 will display the index.html or directory | |
listing file. | |
*/ | |
package main |
nadeem@myznc:~/go/src$ ls -al dummy | |
total 12 | |
drwxrwxr-x 2 nadeem nadeem 4096 Jul 20 18:46 . | |
drwxrwxr-x 6 nadeem nadeem 4096 Jul 20 18:45 .. | |
-rw-rw-r-- 1 nadeem nadeem 129 Jul 20 18:46 hello.go | |
nadeem@myznc:~/go/src/dummy$ cat hello.go | |
// Package dummy contains hello world library. | |
package dummy |
(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)
Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories
Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.
Save that list to some path
The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.
#!/bin/sh | |
# option 2: paste this into user-data to automate install via boot script | |
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours | |
# renames the host to have a suffix of alexellisio | |
export original=$(cat /etc/hostname) | |
sudo hostname $original-master-alexellisio | |
echo $original-master-alexellisio | sudo tee /etc/hostname | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
package main | |
import ( | |
"github.com/kardianos/service" | |
"log" | |
"flag" | |
) | |
type Service struct {} |
package main | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"log" | |
"os" | |
"os/exec" | |
"syscall" |
rm -rf ~/.config/JetBrains/GoLand2021.3/eval | |
rm -rf ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
touch ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
sed -i -E 's/<property name=\"evl.*\".*\/>//' ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
rm -rf ~/.java/.userPrefs/jetbrains/goland |