Skip to content

Instantly share code, notes, and snippets.

@molotovbliss
molotovbliss / create-order.php
Created May 2, 2016 11:35
Magento Orders Import/Export
<?php
require_once '../app/Mage.php';
Mage::app();
$id=1; // get Customer Id
$customer = Mage::getModel('customer/customer')->load($id);
$transaction = Mage::getModel('core/resource_transaction');
$storeId = $customer->getStoreId();
@umputun
umputun / safari-summary.sh
Last active May 21, 2024 07:06
Raycast script for Safari's page summary
#!/bin/sh
# @raycast.schemaVersion 1
# @raycast.title Summarize Safari page
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon ✨
#
# @raycast.packageName Things
@noelbundick
noelbundick / README.md
Last active May 21, 2024 07:04
WSL2 container development with Moby

WSL2 container development with Moby

Building, pulling, pushing, and running containers is something many developers do often without even thinking. Most of my development over the past couple of years has been exclusively in a Linux environment, specifically WSL2.

Even prior to the recent licensing changes to Docker Desktop, I found myself increasingly as an engineer whose workflow didn't line up with my tools. I never used the GUI features. I never built Windows containers. I used kind or k3d instead of the Docker Kubernetes functionality. I never mounted the Windows filesystem into my containers. And I certainly didn't enjoy frequent downtime caused by updates for those features that I wasn't using. I wanted the container experience in my dev environment to match what I got on a server - just the runtime & tools.

That said, I still like shiny new (or not-so-new but I never see anyone use them

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 21, 2024 07:03
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active May 21, 2024 07:02 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@slok
slok / pprof.md
Last active May 21, 2024 07:01
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@HexedHero
HexedHero / mc_client_performance_guide.md
Last active May 21, 2024 07:00
Performance guide for Minecraft 1.20.6+ Clients

Performance guide for Minecraft 1.20.6+ Clients

📜 Fabric

Fabric is the "modern" Minecraft modding software that is very modular.
We use Fabric in this guide so install it by going to https://fabricmc.net/use/ Download the .jar or .exe and run it.

Below is a list of performance and utility mods to make your Minecraft experience better and most importantly smooth.
The list is in order of most importance and they all work together including what they do with why to use them.

@coldfire7
coldfire7 / Valorant Asia Pacific Servers & Ports
Last active May 21, 2024 06:59
Valorant Asia Pacific Servers & Ports
# Valorant Asia Pacific Servers
# Note most of the servers are AWS Global Accelerator anycast IP addresses
# https://aws.amazon.com/global-accelerator/features/#Static_anycast_IP_addresses
# https://en.wikipedia.org/wiki/Anycast
# Last Update: 2023-01-09
# ~CO7DFiRE
# All Asia Pacific Servers
13.248.193.101
13.248.197.71
Shader "Unlit/PolyRhythmVisualizer" {
Properties {
_TimeCode ("Input Time", Float) = 0
_OuterRingFreq ("Outer Ring Frequency", Float) = 1
_InnerRingFreq ("Inner Ring Frequency", Float) = 0.922
_RingCount ("Ring Count", Int) = 35
_VibrantFreq ("Vibrant Frequency", Float) = 2
_Vibrant ("Vibrant", Range(0, 1)) = 0.5
_Decay ("Decay", Range(0, 10)) = 2
[Header(Cosine Gradiant)]
@jonom
jonom / PageController.php
Last active May 21, 2024 06:59
Silverstripe partial caching methods
<?php
use SilverStripe\CMS\Controllers\ContentController;
use SilverStripe\Control\Director;
use SilverStripe\Core\Environment;
/**
* Below are some methods that can be added to PageController for use in partial caching blocks.
* Example: <% cached $EnvCacheKey, $ClassCacheKey('SilverStripe\CMS\Model\SiteTree') unless $DontCache %>
*/