Skip to content

Instantly share code, notes, and snippets.

View alifruliarso's full-sized avatar
Fatherhood, coding, and the quest for Islamic wisdom

Ruli alifruliarso

Fatherhood, coding, and the quest for Islamic wisdom
View GitHub Profile
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@KroniK907
KroniK907 / GitButler-WSL.md
Last active May 13, 2025 14:09
Installing GitButler on Windows via WSL

Installing GitButler on Windows via WSL - A Complete Guide

This guide will provide a complete walkthrough for getting GitButler setup and functioning on a windows environment using Windows Subsystem for Linux (WSL).

Please note that GitButler on windows via wsl is not well tested and not officially supported, though one of the top priorities of the GitButler team is to get a working windows build out asap. For now, however this is the easiest solution I have developed.

Prerequisites:

  • You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 for this guide to work correctly.
  • I highly suggest using the windows terminal app for doing all the command line work if you are not using it already, though this is not required.

Known Issues

@vik-y
vik-y / settings.json
Created September 27, 2023 03:20
VScode configuration that helps you write python code better!
{
"editor.formatOnSave": true,
"python.linting.mypyEnabled": true,
"python.formatting.provider": "black",
"python.sortImports.args": [
"--profile",
"black"
],
"[python]": {
"editor.codeActionsOnSave": {
@smadil997
smadil997 / SocketIOController.java
Created October 8, 2022 07:17
This is socket IO controller.
package com.alis.soft.socketIO.socketcontroller;
import com.alis.soft.socketIO.data.Message;
import com.corundumstudio.socketio.AckRequest;
import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.SocketIOServer;
import com.corundumstudio.socketio.listener.ConnectListener;
import com.corundumstudio.socketio.listener.DataListener;
import com.corundumstudio.socketio.listener.DisconnectListener;
import lombok.extern.log4j.Log4j2;
@smadil997
smadil997 / SocketIOConfig.java
Created October 8, 2022 06:58
Socket IO configuration file
package com.alis.soft.socketIO.config;
import javax.annotation.PreDestroy;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import asyncio
from pyppeteer import launch
from urllib.parse import urlparse
import http.client
import json
import logging
URL = 'https://example.metabase.com/dashboard/4'
USERNAME = 'username'
PASSWORD = 'password'
@lakuapik
lakuapik / .env.example
Last active March 13, 2023 11:55
Laravel Sail example config using alpine:edge image with PHP 8
# file: /laravel-project/.env.example
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_SERVICE=laravel.test
APP_PORT=8000
@selimb
selimb / example_project.py
Last active May 10, 2025 04:43
FastAPI lifespan-scoped (singleton) dependencies
########
# app.py
########
# Example of how I use it in my project. This file cannot be run as-is.
# The only difference with the example in the fastapi_singleton module docstring is
# the use of a subclassed FastAPI application to define type annotations
import fastapi
import fastapi_singleton
@jonnyjava
jonnyjava / working_effectively_with_legacy_code.md
Created November 4, 2019 21:51
Working effectively with legacy code summary

WORKING EFFECTIVELY WITH LEGACY CODE

To me, legacy code is simply code without tests. I’ve gotten some grief for this definition. What do tests have to do with whether code is bad? To me, the answer is straightforward, and it is a point that I elaborate throughout the book: Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.

Chapter 1 Changing Software

Four Reasons to Change Software: For simplicity’s sake, let’s look at four primary reasons to change software.

@stewartadam
stewartadam / main.py
Last active September 9, 2024 12:41 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re