For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
import time | |
import logging | |
from kiteconnect import WebSocket | |
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
# Initialise. | |
kws = WebSocket("api_key", "public_token", "zerodha_user_id") | |
# RELIANCE BSE and RELIANCE NSE |
// CustomTime provides an example of how to declare a new time Type with a custom formatter. | |
// Note that time.Time methods are not available, if needed you can add and cast like the String method does | |
// Otherwise, only use in the json struct at marshal/unmarshal time. | |
type CustomTime time.Time | |
const ctLayout = "2006-01-02 15:04:05 Z07:00" | |
// UnmarshalJSON Parses the json string in the custom format | |
func (ct *CustomTime) UnmarshalJSON(b []byte) (err error) { |
/* Program for Printing first N terms of Fibonacci series using for loop (without taking input from user) | |
* Code by Vivek R (vividvilla) - Contact me at - http://vivek.techiestuffs.com | |
*/ | |
public class FibonacciFor { | |
public static void main(String[] args) | |
{ | |
int n=10,first=0,second=1,next,i; | |
System.out.println("Printing first "+n+" numbers in Fibonacci Series \n"); |
import os | |
import re | |
def fish_to_zsh(cmd): | |
return (cmd.replace('; and ', '&&') | |
.replace('; or ', '||')) | |
with open(os.path.expanduser('~/.zsh_history.test'), 'a') as o: | |
with open(os.path.expanduser('~/.local/share/fish/fish_history')) as f: | |
for line in f: |
server { | |
listen 9999; | |
# This is the key. | |
error_page 405 =200 $uri; | |
location /test { | |
add_header 'Content-Type' 'application/json' always; | |
alias /Users/me/abc.json; | |
} | |
} |
<?php | |
/** | |
* Product loop sale flash | |
* | |
* @author Vivek R @ WPSTuffs.com | |
* @package WooCommerce/Templates | |
* @version 1.6.4 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
func getCookie(name string, r interface{}) (*http.Cookie, error) { | |
rd := r.(*http.Request) | |
cookie, err := rd.Cookie(name) | |
if err != nil { | |
return nil, err | |
} | |
return cookie, nil | |
} | |
func setCookie(cookie *http.Cookie, w interface{}) error { |
// Display weekly archives | |
<?php wp_get_archives('type=weekly'); ?> | |
// Last 10 weeks archive | |
<?php wp_get_archives('type=weekly&limit=10'); ?> | |
// Monthly archive with post count |
log_format timed_combined '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" ' | |
'$request_time $upstream_response_time $pipe'; |