Skip to content

Instantly share code, notes, and snippets.

@Rodrigo54
Rodrigo54 / php-html-css-js-minifier.php
Last active January 7, 2025 08:48 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@eccegordo
eccegordo / intro-to-ember-cli-node.md
Created March 21, 2015 11:14
Introduction to Ember CLI, Node and NPM

Introduction To Node, NPM and Ember CLI

This guide is for developers who are new Node, NPM, and Ember CLI. This guide is designed to get you started with ember cli development and provide some general background info on what Node is and how it works with Ember CLI.

Overview

  • What is Node?
  • What is NPM?
  • How do I setup my environment if I don't have node js or npm installed?
  • I accidently installed something wrong how can I start over?
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 7, 2025 08:45
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@macshome
macshome / defang.md
Last active January 7, 2025 08:44
How to defang system protections on macOS

How to Defang macOS System Protections

If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.

Note that all of these things put a Mac into an unsupported and less secure state.

Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around

Protections and Terms

(This list is not exahustive on the details of each. Check the links at the end for more info.)

@martijnvermaat
martijnvermaat / __init__.py
Last active January 7, 2025 08:43
Matplotlib for use in LaTeX
import math
from matplotlib import rcParams
def configure(document_fontsize=14.4, available_width=307.28987):
"""
Configures Matplotlib so saved figures can be used in LaTeX documents.
Uses the sans-serif TeX Gyre Heros font (Helvetica), also for math.
@rsanden
rsanden / tun2socks_proxy_foo.bash
Last active January 7, 2025 08:43
tun2socks TCP+UDP user-wide proxy through shadowsocks and udpgw
#--- Build tun2socks and udpgw (as the user who will use the proxy) ---
mkdir -p $HOME/src
cd $HOME/src
git clone "https://github.com/ambrop72/badvpn"
cd badvpn
mkdir -p build
cd build
export OUTDIR=$PWD
export SRCDIR=$(dirname $PWD)
@EgorBron
EgorBron / discord-revive.md
Last active January 7, 2025 08:42
Восстанавливаем доступ к ДС с помощью Amnezia WG

Оживляем ДС

Быстрый способ (на ~10 минут) для разблокировки Discord вместе с голосовыми каналами. Этот способ также разблокирует YouTube и X/Twitter, а также любые другие заблокированные сайты.

Спасибо ImMAILWARE за скрипт для генерации конфигов.

Я рекомендую сразу перейти к способу с браузером, так как его относительно проще провернуть.

Способ с Linux

@tzechienchu
tzechienchu / UART.scala
Created July 17, 2021 12:18
UART from Chisel Book
import chisel3._
import chisel3.util._
class Channel extends Bundle {
val data = Input(Bits(8.W))
val ready = Output(Bool())
val valid = Input(Bool())
}
//Single Bye Buffer