Skip to content

Instantly share code, notes, and snippets.

View ctlaltlaltc's full-sized avatar

Jep ctlaltlaltc

  • shenzhen
View GitHub Profile
@ctlaltlaltc
ctlaltlaltc / devops.groovy
Created January 18, 2021 11:46
kubemanager devops pipeline demo code
def kubemanager_ip="10.113.85.155"
def kubemanager_registry_ip="10.113.85.156"
def kubemanager_token="token-8wmgj:v6vbx2b6t22bqtqth28wnrzdxnt4hnqb4n5b5qcmfzfc2r64spx49n"
def kubemanager_project="c-zk8h7:p-s4qjg"
podTemplate(yaml: """
apiVersion: v1
kind: Pod
spec:
volumes:
- name: docker-socket
@ctlaltlaltc
ctlaltlaltc / GitHub-Forking.md
Created March 15, 2018 02:02 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

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.

Creating a Fork

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

@ctlaltlaltc
ctlaltlaltc / learn.c
Last active July 7, 2017 15:16
galgorithm and data struct
#include<stdio.h>
#include<stdlib.h>
struct LinkNode {
int val;
struct LinkNode *prev;
struct LinkNode *next;
};
struct LinkNode *InitDNode(struct LinkNode *head)
@ctlaltlaltc
ctlaltlaltc / hash.c
Created May 19, 2015 05:02
简单的哈希表数据结构实现 https://github.com/watmough/jwHash
// gcc -DHASHDEBUG hash.c -o hash
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#ifdef HASHDEBUG
# define HASH_DEBUG(fmt,args...) printf(fmt, ## args)
#else
# define HASH_DEBUG(fmt,args...) do {} while (0);
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
@ctlaltlaltc
ctlaltlaltc / list.h
Created April 14, 2015 12:38
Simple doubly linked list implementation, modify from linux kernel list.h, so we can use it in application.
#ifndef _LIST_H
#define _LIST_H
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
struct list_head {
struct list_head *next, *prev;