Skip to content

Instantly share code, notes, and snippets.

@denji
denji / http-benchmark.md
Last active April 25, 2024 15:38
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@slykar
slykar / docker-compose-hackintosh.md
Last active April 25, 2024 15:37
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@lavantien
lavantien / modern-software-engineering-resources.md
Last active April 25, 2024 15:36
Modern Software Engineering Resources

Modern Software Engineering

Knowledge and Education should be open and free. Hierarchy and Exploitation must be abolished.

  • Z. (down) Notes below. Avoid funnel sales, if you spent money, there's something wrong. Also don't forget good OpSec, self defense gears, and physical/mental strength.
  • A. (go) Development Environment.
  • B. (go) Complementary Subjects (Linguistics, English, Security, OpSec, Psychology, Anthropology, History, Philosophy, Economics, Business, Defense, Cooking, Xenology, Self Defense).
  • C. (go) Fundamentals of Science and Technology (Logic, Physics (Classical/Quantum Mechanics, Thermodynamics, Electricity, Relativity, Electronics, Electromagnetism, Optoelectronic, Semiconductor, Fusion), Mathematics (Calculus, Linear Algebra, Statistics, Applied Math), Game Theory, Geology/Geography, Business, Biology, Medical, and Their Applications).
  • D. ([go](#d-co
@danyashorokh
danyashorokh / [Python] Pymssql insert from pandas to db
Created June 7, 2018 08:23
[Python] Pymssql insert from pandas to db
import pymssql
import pandas as pd
from datetime import datetime
data = pd.DataFrame([[datetime.now(), 'info', 1791010101, 1232173177, 0.67]])
conn = pymssql.connect(host, user, password, db, charset='cp1251')
cur = conn.cursor()
query = "INSERT INTO dbo.TABLE VALUES (%s, %s, %s, %s, %s)"
sql_data = tuple(map(tuple, data.values))
print(sql_data)
@HerringtonDarkholme
HerringtonDarkholme / nihongo.cpp
Last active April 25, 2024 15:33
g++ nihongo.cpp
#define エスティーディー std
#define アイオーストリーム <iostream>
#define ユージング using
#define イフ if
#define インクルード #include
#define イント int
#define シーアウト cout
#define シーイン cin
#define ネームスペース namespace
#define ブール bool
@voldmar
voldmar / signals.py
Last active April 25, 2024 15:32
Show all signals receivers in Django project (quickfixed to work with Django 1.10)
# coding:utf-8
from sys import modules
import gc
import inspect
import six
from django.core.management.base import BaseCommand
from django.dispatch.dispatcher import Signal, WeakMethod
@kuator
kuator / Hide youtube controls.js
Last active April 25, 2024 15:30
Hide Youtube controls by pressing h
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active April 25, 2024 15:30
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@xgqfrms
xgqfrms / 如何使用 macOS 剪切文件的方法汇总.md
Created April 25, 2024 15:29
如何使用 macOS 剪切文件的方法汇总

如何使用 macOS 剪切文件的方法汇总

  1. 在多个 Finder 窗口间,直接拖拽文件

  2. 使用快捷键 Option + Command + V 剪切文件

@KlassenKonstantin
KlassenKonstantin / RubberBandSlider.kt
Created January 15, 2024 17:16
Rubber Band Slider Compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
RubberBandSliderTheme {
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
Box(contentAlignment = Alignment.Center) {
RubberBandSlider(modifier = Modifier
.height(200.dp)