Skip to content

Instantly share code, notes, and snippets.

@LunaCodeGirl
LunaCodeGirl / examples.sh
Created September 25, 2013 23:39
Figlet how to and examples
figlet "I've got something to say"
figlet -f thick "Make Tech ASCIIer"
date | figlet -f basic
@sergiobd
sergiobd / Dockerfile
Created September 4, 2023 07:46
Dockerfile for 3D Gaussian splatting
## Unofficial Dockerfile for 3D Gaussian Splatting for Real-Time Radiance Field Rendering
## Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler, George Drettakis
## https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
# Use the base image with PyTorch and CUDA support
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
# NOTE:
# Building the libraries for this repository requires cuda *DURING BUILD PHASE*, therefore:
public class CleanArchitectureTests : BaseTests
{
[Fact]
public void CleanArchitecture_Layers_ApplicationDoesNotReferenceInfrastructure()
{
AllTypes.That().ResideInNamespace("CleanArchitecture.Application")
.ShouldNot().HaveDependencyOn("CleanArchitecture.Infrastructure")
.AssertIsSuccessful();
}
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 6, 2024 19:05
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@alirezamika
alirezamika / autoscraper-examples.md
Last active May 6, 2024 19:04
AutoScraper Examples

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@avtaniket
avtaniket / cors.php
Last active May 6, 2024 19:02
Handle CORS in PHP
<?php
/* Handle CORS */
// Specify domains from which requests are allowed
header('Access-Control-Allow-Origin: *');
// Specify which request methods are allowed
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS');
@ivanmp91
ivanmp91 / get-daemonset-conflict-node.sh
Last active May 6, 2024 19:02
Get the node name where a daemonset pod cannot be allocated
for i in `kubectl get nodes | awk '{print $1}'` ; do
node=`kubectl get pods -o wide | grep -i $i | grep -i <POD NAME>`
if [ -z "$node" ] ; then
echo "##### $i ######"
fi
done
@daaximus
daaximus / usb.extended.ids
Created April 1, 2023 03:27
Extended USB Device List
This file has been truncated, but you can view the full file.
0000:0000=Device
0000:0002=USB Implementer Forum Mass Storage
0000:3825=USB Mouse
0000:7777=USB Flash Drive
0001:0001=Gaming Optical Mouse5
0001:142b=Arbiter Systems, Inc.
0001:7778=Fry's Electronics Counterfeit flash drive [Kingston]
0002:0002=Ingram passport00
0002:7007=Ingram HPRT XT300
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active May 6, 2024 18:58
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

Script para bloquear IPs Mikrotik

Script para gerar a lista de ips da blacklist https://forum.mikrotik.com/viewtopic.php?t=152632 basta copiar o script abaixo e rodar no terminal.

{
    ip firewall address-list
    :local update do={
        :do {
            :local data ([:tool fetch url=$url output=user as-value]->"data")