Skip to content

Instantly share code, notes, and snippets.

View KaulSe's full-sized avatar
🏠
Working from home

Sebastien Kaul KaulSe

🏠
Working from home
View GitHub Profile
@KaulSe
KaulSe / gist:6651f5af2d5b98f98bf6662844529ae2
Last active June 12, 2022 21:05
top yii php packages
2amigos/egeoip
2amigos/qrcode-library
2amigos/resource-manager
2amigos/transliterator-helper
2amigos/yii-aws
2amigos/yii-cdn-asset-management-library
2amigos/yii-ei18n
2amigos/yii-helpers
2amigos/yii2-arrayquery-component
2amigos/yii2-bootstrap-form-helpers-library
@KaulSe
KaulSe / xmltojson.py
Created May 10, 2022 15:44
Pipe XML to json; cat file.xml | python3 /tmp/xmltojson.py | jq
#!/usr/bin/env python3
import json
import sys
import xmltodict
import fileinput
def main():
if len(sys.argv) != 1:
print("Usage: xml-to-json")
@KaulSe
KaulSe / deleter.c
Created August 21, 2021 14:04
Delete files smaller than 1000 bytes using stat and readdir.
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <sys/errno.h>
#include <sys/stat.h>
int main(int argc, char *argv[]) {
DIR *dir;
struct dirent *ent;
struct stat st;
@KaulSe
KaulSe / rancher-deployment.yaml
Created November 13, 2020 12:37
Manual Rancher deployment yaml
apiVersion: v1
kind: Service
metadata:
name: rancher-server
namespace: cattle-system
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP