Skip to content

Instantly share code, notes, and snippets.

@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@DraTeots
DraTeots / ComPort over Network.md
Last active May 9, 2024 13:07
ComPort over Network

I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:

Do consider to STAR, if it helped you.

London

@denji
denji / http-benchmark.md
Last active May 9, 2024 13:04
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@m33x
m33x / hass.js
Last active May 9, 2024 13:03
Simple Home Assistant (HASS) iOS Widget via Scriptable App
let widget = await createWidget();
if (!config.runsInWidget) {
await widget.presentSmall();
}
Script.setWidget(widget);
Script.complete();
async function createWidget(items) {
@RealMuffinTime
RealMuffinTime / log4j2.xml
Last active May 9, 2024 13:06 — forked from ItsFlare/log4j2.xml
For use with Paper and Ansi in MC 1.20.4
<?xml version="1.0" encoding="UTF-8"?>
<!--
- This logger config is copied from https://gist.github.com/stephan-gh/e85abdaf419fa3636c55848cf0ca2e1b
- This logger config is copied from https://gist.github.com/ItsFlare/f8767a4e7da6e5332fbe7a1a69abe279
-
- To use this file, add this to JVM args: -Dlog4j.configurationFile=log4j2.xml
-
- For more information, see
- https://logging.apache.org/log4j/2.0/manual/filters.html
-->
@rabeeaali
rabeeaali / DateConverter.php
Last active May 9, 2024 13:00
Convert Date From Hijri to Gregorian And vice versa
<?php
namespace App\Services;
class DateConverter
{
public static $Day;
public static $Month;
public static $Year;
@luckman212
luckman212 / icloud_ubiquity_fix.sh
Created October 9, 2023 17:28
Fix for stuck iCloud Ubiquity containers reported as Client Truth Client Truth Unclean Items
#!/usr/bin/env bash
CLIENT_DB="$HOME/Library/Application Support/CloudDocs/session/db/client.db"
[[ -e $CLIENT_DB ]] || { echo "db not found"; exit 1; }
mapfile -t ITEM_IDS < <(sqlite3 "$CLIENT_DB" <<-EOS
SELECT throttle_id
FROM client_sync_up
EOS
)
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@d7samurai
d7samurai / .readme.md
Last active May 9, 2024 12:59
Minimal D3D11 sprite renderer NEO

sponsored by SuperNeo copy 4

Minimal D3D11 sprite renderer NEO

Ultra-compact sprite rendering code with example frame animation logic. This release contains tech bits from the upcoming SuperNeo™ 2D game engine and includes rotation, anchor/pivot point, color filtering, alpha blending and built-in antialiased point sampling. As usual: complete, runnable single-function app. ~150 LOC. No modern C++, OOP or (other) obscuring cruft.

Minimal D3D11 sprite renderer NEO 1337

Sprites are rendered back-to-front (AKA "painter's algorithm") in the order they are submitted, as one draw call. The provided setup employs a single texture atlas containing all the sprite graphics.

The renderer is "im