This is the full version of the thread for opencart#1286, archived from notification emails.
The discussion has since been deleted almost entirely by OpenCart's developer.
Everyone who posted in it has also been blocked from the OpenCart repo.
import struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
# import threading | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): |
var inputbox = $('#bufferInputView' + cb().bid()); | |
var msg = inputbox.val(); | |
inputbox.val(""); | |
var cc = "\u0003"; | |
var bold = "\u0002"; | |
var reset = "\u000f"; | |
var italic = "\u0016"; | |
var underline = "\u001f"; | |
cb().say(msg.replace(/&b/g,bold).replace(/&r/g,reset).replace(/&i/g,italic).replace(/&u/g,underline).replace(/&/g,cc)); |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.
Once you have a remote set up for one of your upstreams, run these commands with:
git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]
Once set up, git remote -v
should show two (push) URLs and one (fetch) URL. Something like this:
/* | |
Wrap long lines on rough column boundaries at spaces | |
Working example: https://play.golang.org/p/3u0X6NyMua | |
Based on algo from RosettaCode, which is nifty | |
https://www.rosettacode.org/wiki/Word_wrap#Go | |
*/ | |
package main | |
import ( |
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"time" | |
) | |
func reader(r io.Reader) { |
#!/bin/sh | |
eval `go build -work -a 2>&1` && find $WORK -type f -name "*.a" | xargs -I{} du -hxs "{}" | gsort -rh | sed -e s:${WORK}/::g |
--- | |
platform: linux | |
image_resource: | |
type: docker-image | |
source: {repository: gcr.io/kaniko-project/executor} | |
inputs: | |
- name: source |
- socat
kubectl
with proper~/.kube/config
that can connect to your cluster- Working knowledge of
kubectl
client - OpenSSH client
kubectl
does port forwarding tosshd
port of your pod. I'm usingpm2
process managed to keep my services alive in my workstation container. If you have onlysshd
, easiest to use isdropbear
ProxyCommand
of OpenSSH client usessocat
to redirect two wayfd
-
to forwarded port ofkubectl
- Voila! You are in