Skip to content

Instantly share code, notes, and snippets.

@adammyhre
adammyhre / GravityWell.cs
Last active July 23, 2024 08:23
Player Controller Sandbox Scripts
using UnityEngine;
using UnityUtils;
[RequireComponent(typeof(TriggerArea))]
public class GravityWell : MonoBehaviour {
TriggerArea triggerArea;
void Start() {
triggerArea = GetComponent<TriggerArea>();
}
@ksimka
ksimka / inarray_flipisset_arraysearch.php
Created March 4, 2015 13:24
in_array vs array_flip+isset vs array_search
<?php
$a = [];
//$s = 123456;
$s = 's6tbdfgj222dJGk';
$rs = str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 10);
$numGen = function() {
return rand(1, 9999999);
};
@Fazzani
Fazzani / free_m3u8.m3u
Created July 28, 2018 09:13
Free m3u8 streams
http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8
http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
@lynxz
lynxz / LuceneExstensions.cs
Created February 16, 2018 06:25
Extends RavenDB 4.0 IDocumentQuery to parse longer lucene strings into RQL
using System;
using System.Collections.Generic;
using System.Linq;
using Raven.Client.Documents.Session;
namespace Finisar.Phoenix.Raven {
public static class LuceneExstensions {
public static IDocumentQuery<T> WhereLucene<T>( this IDocumentQuery<T> query, string luceneQuery ) {
var luceneParser = new LuceneParser( luceneQuery );
import os
os.environ["OPENAI_API_KEY"] = "XXX"
os.environ["GROQ_API_KEY"] = "YYY"
from routellm.controller import Controller
client = Controller(
routers=["mf"],
strong_model="gpt-4-1106-preview",
@wcoastsands
wcoastsands / ReaperInstallGuide.md
Last active July 23, 2024 08:02
Installing Reaper on Ubuntu 22.04 LTS

Installing Reaper on Ubuntu 22.04 LTS

The best way to install the Reaper digital audio workstation on Linux is to install the included script. You’ll have to download the Reaper DAW program files from the internet to start.

After downloading the latest Reaper DAW files to your computer, you’ll have to extract the contents of the TarXZ archive using the tar command.

tar xvf reaper646_linux_x86_64.tar.xz

Once the extraction process is complete, you must create a folder named Reaper in your home directory using the mkdir command.

@maxwelleite
maxwelleite / ttf-wine-tahoma-installer.sh
Last active July 23, 2024 07:56
Script to install the latest Wine Tahoma fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install the latest Wine Tahoma Regular and Wine Tahoma Bold fonts on Ubuntu distros from the Wine Project.
# The Wine project includes the free and open-source fonts Wine Tahoma Regular and Wine Tahoma Bold released under LGPL
# designed to have identical metrics to the Microsoft Tahoma font. This was done because Tahoma is available by default
# on Windows, and many applications expect the font to be available.
# Dependencies: wget
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
# Latest Update: 20/11/2020
@lavantien
lavantien / modern-software-engineering-resources.md
Last active July 23, 2024 07:52
Modern Software Engineering Resources

Modern Software Engineering

University of Anarchism - SWE Library and Master of Science (MSc) Curriculum

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

Wake up dog, we're being enslaved! No gods, no masters! Fuck authority! All hierarchical power structures are inherently evil. They'll do whatever it takes to maintain the asymmetries of power, wealth, and information, whether it's deception, manipulation, coercion, or violent domination.

The Foundation (jump)

@champsupertramp
champsupertramp / Ultimate Member - adding custom fields in account page and tab
Last active July 23, 2024 07:49
Ultimate Member - adding custom fields in account page and tab
<?php
/* Add fields to account page */
add_action('um_after_account_general', 'showExtraFields', 100);
function showExtraFields()
{
$custom_fields = [
"alternate_email" => "Permanent E-mail Address",
"major" => "Major",
"minor" => "Minor",
"gpa" => "GPA",
@wojteklu
wojteklu / clean_code.md
Last active July 23, 2024 07:47
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules