Skip to content

Instantly share code, notes, and snippets.

@moloy666
moloy666 / gist:4342cf66b7d047bf39f9e45f392ff354
Created April 27, 2024 11:59
convert data to csv in yii
$dataProvider = $this->getPendingBookingsDataProvider();
$models = $dataProvider->getModels();
Yii::$app->response->format = Response::FORMAT_RAW;
Yii::$app->response->headers->set('Content-Type', 'text/csv');
Yii::$app->response->headers->set('Content-Disposition', 'attachment; filename="data.csv"');
Yii::$app->response->send();
$csvHeader = ['#', 'Customer', 'Contact', 'Camp Name', 'Event Name', 'Check In', 'Total Price', 'Created At', 'Status'];
Maintainers:
rucadi: valkey, valkey, valkey, valkey
x86_64-linux valkey
x86_64-darwin valkey
aarch64-linux valkey
aarch64-darwin valkey
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created April 27, 2024 11:56
Rimworld output log published using HugsLib
Log uploaded on Saturday, April 27, 2024, 8:56:24 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
Humanoid Alien Races(erdelf.HumanoidAlienRaces): 0Harmony(2.3.3), AlienRace(1.0.0)
Gloomy Dragonian race(RooAndGloomy.DragonianRaceMod): Dragonian(1.0.0)
@mypy-play
mypy-play / main.py
Created April 27, 2024 11:56
Shared via mypy Playground
from typing import Iterator
def fib(n: int) -> Iterator[int]:
a, b = 0, 1
while a < n:
yield a
a, b = b, a + b
@SoundDr0ut
SoundDr0ut / CompleteDiscordQuest.md
Created April 27, 2024 11:54 — forked from aamiaa/CompleteDiscordQuest.md
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@lwd-temp
lwd-temp / donate_xmr.txt
Last active April 27, 2024 11:56
捐赠门罗币/Donate XMR
monero:84oD8Ldx9U29e12FwoJ2ohYEYjQEJV3E9EovgSvMVHB2446vTRRyQp6TTgeMBwTAWPEuQcpo4FnPF9Ax62WJp9h7Hn76oLU?recipient_name=Sunset%20Mikoto&tx_description=Donation
[18:44:45] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[18:44:45] [main/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[18:44:45] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[18:44:45] [main/INFO]: Forge Mod Loader version 14.23.5.2859 for Minecraft 1.12.2 loading
[18:44:45] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_51, running on Windows 10:amd64:10.0, installed at C:\Users\Admin\AppData\Roaming\.minecraft\runtime\jre-legacy\windows\jre-legacy
[18:44:45] [main/INFO]: Searching C:\Users\Admin\AppData\Roaming\.minecraft\versions\Test\mods for mods
[18:44:45] [main/INFO]: Loading tweaker org.spongepowered.asm.launch.MixinTweaker from _MixinBootstrap-1.1.0.jar
[18:44:45] [main/INFO]: Loading tweaker org.spongepowered.asm.launch.MixinTweaker from Nothirium-1.12.2-0.3.4-beta.jar
[18:44:45] [main/INFO]: Loading tweaker optifine.OptiFineForgeTweaker from OptiFine-1.1
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created April 27, 2024 11:54
Rimworld output log published using HugsLib
Log uploaded on Saturday, April 27, 2024, 12:53:58 PM
Loaded mods:
Prepatcher(zetrith.prepatcher): 0Harmony(2.2.2), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0)
Harmony(brrainz.harmony): 0Harmony(2.2.2), HarmonyMod(1.5.0)
Faster Game Loading(Taranchuk.FasterGameLoading): FasterGameLoading(1.0.0), System.Drawing(av:4.0.0,fv:4.6.57)
Fishery - Modding Library(bs.fishery): 0PrepatcherAPI(1.2.0), 1Fishery(0.5.1.2), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Core(Ludeon.RimWorld): (no assemblies)
Better Log - Fix your errors(bs.betterlog): 0PrepatcherAPI(1.2.0), 1Fishery(0.5.1.2), BetterLog(1.1.0), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Performance Fish(bs.performance): PerformanceFish(0.5.0)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
using System;
using System.Collections.Generic;
namespace Collections2
{
internal class Program
{
static void Main(string[] args)
{
bool isOpen = true;