Skip to content

Instantly share code, notes, and snippets.

@nir9
nir9 / server.c
Created November 25, 2023 16:50
Minimalist C Web Server - not for production use, only for fun :)
#include <sys/socket.h>
#include <string.h>
#include <fcntl.h>
#include <sys/sendfile.h>
#include <unistd.h>
#include <netinet/in.h>
void main() {
int s = socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in addr = {
@hayajo
hayajo / changelog_en.md
Last active April 16, 2024 12:57
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@RubenKelevra
RubenKelevra / fast_firefox.md
Last active April 16, 2024 12:56
Make Firefox fast again
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@sjgallagher2
sjgallagher2 / basic-embedded-c.c
Last active April 16, 2024 12:54
A get-started-fast guide to embedded C
/*
* In embedded systems, the C programming language is most often the language of choice. For more intensive
* elements in the system, assembly can be used. Embedded C is distinct from typical C programming in its
* requirements for efficiency, its limited resources, and its unique hardware problems which are much less common in
* the majority of C programs. Even still, the language itself is the same, so check out K&R's The C Programming
* Language and other reference books.
*
* Some of the problems central to embedded systems programming:
* - Memory management
* - Register access and manipulation
@Blackshome
Blackshome / sensor-light.yaml
Last active April 16, 2024 12:53
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 6.5**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@Blackshome
Blackshome / low-battery-notifications-and-actions.yaml
Last active April 16, 2024 12:52
low-battery-notifications-and-actions.yaml
blueprint:
name: Low Battery Notifications & Actions
description: >
# 🪫 Low Battery Notifications & Actions
**Version: 2.1**
🚀 Stay Charged, Stay Smart! Let's automate and take charge of your battery maintenance!🔋⚡
@ilkou
ilkou / shadcn-ui react-select.jsx
Created March 26, 2024 13:54
react-select with shadcn/ui
/* ----------- simple-select.js ----------- */
import * as React from 'react';
import Select from 'react-select';
import type { Props } from 'react-select';
import { defaultClassNames, defaultStyles } from './helper';
import {
ClearIndicator,
DropdownIndicator,
MultiValueRemove,
Option
@vikassaini01
vikassaini01 / kms
Last active April 16, 2024 12:51 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
@mycred
mycred / mycred-woo-reward-percent-of-order
Created July 26, 2018 09:46
Reward store purchases by paying a percentage of the order total as points to the buyer.
/**
* Woo Point Rewards by Order Total
* Reward store purchases by paying a percentage of the order total
* as points to the buyer.
* @version 1.1
*/
function mycred_pro_reward_order_percentage( $order_id ) {
if ( ! function_exists( 'mycred' ) ) return;