Skip to content

Instantly share code, notes, and snippets.

Because of 'Meslo for Powerline' font doens't work with Putty.
So we need another patched font to display powerline correctly.
Here are the list:
- DejaVu Sans Mono for Powerline (https://github.com/powerline/fonts/tree/master/DejaVuSansMono)
- Droid Sans Mono for Powerline (https://github.com/powerline/fonts/tree/master/DroidSansMono)
To change font: On main window (Putty Configuration) -> Window -> Apearance -> Font settings -> Change
To test, enter this in the terminal screen: echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"
from protorpc import messages
class MultiMessage(messages.Message):
"""Has a field for each basic value type.
"""
boolean = messages.BooleanField(1)
integer = messages.IntegerField(2)
float = messages.FloatField(3)
string = messages.StringField(4)
@shacker
shacker / gist:87908e13c9ee6655ce90
Last active October 5, 2023 17:46
Using the Workday API with Python and the suds client library
import sys
from suds import client
from suds.wsse import Security, UsernameToken
from suds.sax.text import Raw
from suds.sudsobject import asdict
from suds import WebFault
'''
Given a Workday Employee_ID, returns the last name of that employee.
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@svpino
svpino / pipeline_example.py
Created May 18, 2015 23:49
Google App Engine Pipeline API Example
# This pipeline sums up a bunch of values. That simple.
class SumPipeline(pipeline.Pipeline):
def run(self, *values):
return sum(values)
# This pipeline takes care of computing the score of one specific player
class PlayerScorePipeline(pipeline.Pipeline):
def run(self, player, level):
# Let's call our remote REST API to return the score
# of this player on the supplied level.
@yunano
yunano / consul.service
Created May 1, 2015 15:52
/etc/systemd/system/consul.service
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=-/etc/sysconfig/consul
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d
# -*- coding:utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from datetime import datetime
from pyramid.config import Configurator
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPError
from pyramid.response import Response
import json
import sqlalchemy as sa
@stojg
stojg / consul
Created December 1, 2014 04:51
consul service init script for debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Consul service discovery framework
# Description: Healthchecks local services and registers
# them in a central consul database.
@bsommardahl
bsommardahl / gist:8605208
Last active January 17, 2024 15:42
RTD Client in C#
public interface IRtdClient
{
object GetValue(params object[] args);
}
public class RtdClient : IRtdClient
{
readonly string _rtdProgId;
static IRtdServer _rtdServer;
@jeremydw
jeremydw / google-app-engine-environment.textile
Last active April 8, 2018 13:19
Google App Engine Environment Variables (as of Google App Engine/1.8.6, October 2013)
APPENGINE_RUNTIME python27
APPLICATION_ID s~appid
AUTH_DOMAIN gmail.com
CONTENT_LENGTH 148
CONTENT_TYPE application/x-www-form-urlencoded
CURRENT_MODULE_ID default
CURRENT_VERSION_ID appid.370290628632119235
DATACENTER us1
DEFAULT_VERSION_HOSTNAME appid.appspot.com
HTTPS on