Skip to content

Instantly share code, notes, and snippets.

@er-pkumar
er-pkumar / laravel-pint.md
Last active May 7, 2024 06:11
Laravel Pint is a tool built on top of PHP-CS-Fixer for PHP code that helps you style your code in a specific way, especially if you prefer a minimalist approach.

What?

Laravel Pint is a tool built on top of PHP-CS-Fixer for PHP code that helps you style your code in a specific way, especially if you prefer a minimalist approach. By default install by installing fresh laravel application, Pint does not require any configuration and will fix code style issues in your code by following the opinionated coding style of Laravel.

Why Pint?

  • Consistency: Pint enforces a consistent code style across your Laravel projects, making it easier for developers to read and understand each other's code.
@er-pkumar
er-pkumar / search_multiple_column.md
Last active May 7, 2024 06:11
Laravel way to search across multiple column in table
$searchString = $request->validated('keyword');
$user = User::whereAny(
    [
        'first_name',
        'last_name',
        'email'
    ],
 'ilike',
@agritheory
agritheory / unshallow_clone_repo.md
Last active May 7, 2024 06:11
Create a full clone of a Frappe app locally

Create a full clone of a Frappe app locally

Synthesized from several helpful stackoverflow responses and some trial and error. This is intended for use in a development or possibly staging environment.

bench get-app cloud_storage git@github.com:agritheory/cloud_storage.git --skip-assets

This will complete the default clone/install (but not build) of a Frappe app.

@drautb
drautb / CMake: Variable Dump
Created July 3, 2013 20:11
This snippet will dump all CMake variables to the build output
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
@natedileas
natedileas / redirect.py
Last active May 7, 2024 06:10
c-level stdout redirection on windows
""" Tested on Windows 10, 64 bit, Python 3.6
Sources:
https://eli.thegreenplace.net/2015/redirecting-all-kinds-of-stdout-in-python/
https://stackoverflow.com/questions/17942874/stdout-redirection-with-ctypes
"""
from contextlib import contextmanager
import ctypes
import io
import os, sys
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 7, 2024 06:08
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 7, 2024 06:08
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@ivakhnov
ivakhnov / GlobalProtect.md
Created February 28, 2020 21:31
[How to quit GlobalProtect (mac)] If you've used the globalprotect client for Mac, you may notice that there is no way to exit it, meaning it can continue submitting information about your system to your company in the background, including your current patches, interface information and much much more, even at times you're not connected to the …

We can just unload the launchd script keeping it alive.

Stop spying on me:

launchctl unload /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*

I want to use the VPN again:

launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*

@mikebuss
mikebuss / decode-json-swift.swift
Created January 25, 2019 21:46
Decode [Any] and [String: Any] Swift 4
//
//
// Adapted from:
//
// Original: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24
// Adds encoding: https://github.com/3D4Medical/glTFSceneKit/blob/master/Sources/glTFSceneKit/GLTF/JSONCodingKeys.swift
// Adds fix for null inside arrays causing infinite loop: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24#gistcomment-2807855
//
struct JSONCodingKeys: CodingKey {
var stringValue: String
using NtApiDotNet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;