Skip to content

Instantly share code, notes, and snippets.

@tfhartmann
tfhartmann / sqs.py
Created February 12, 2014 14:02
Example script on how to poll a AWS SQS Queue and pull off messages
#!//opt/boxen/homebrew/bin/python
import boto.sqs
from boto.sqs.message import RawMessage
import json
import time
import requests
REGION = 'us-west-2'
@adrianhajdin
adrianhajdin / index.css
Created November 11, 2021 13:19
Build and Deploy a Fully Responsive Website with Modern UI/UX in React JS
.gpt3__whatgpt3 {
display: flex;
flex-direction: column;
padding: 2rem;
background: var(--color-footer);
/* ff 3.6+ */
background:-moz-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
@YodaheaD
YodaheaD / MsalWrapper
Created August 30, 2023 21:00
MSAL wrapper component for NextJS apps
"use client";
import { MsalProvider } from "@azure/msal-react";
import { msalInstance } from "../../config/msal";
import React from "react";
type Props = {
children?: React.ReactNode;
};
@slavfox
slavfox / sample
Created February 16, 2020 16:43
Cozette sample file
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ♡ Cozette ♡ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ A B C D E F G H I J K L M │
│ N O P Q R S T U V W X Y Z │
╞═══════════════════════════╡
│ 1 2 3 4 5 6 7 8 9 0 │
╞═══════════════════════════╡
@willurd
willurd / web-servers.md
Last active April 23, 2024 23:07
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@alfchee
alfchee / NumeroALetras.js
Last active April 23, 2024 23:04
Código en JavaScript que convierte números a letras, bastante útil para formularios de documentos contables y similares
/*************************************************************/
// NumeroALetras
// The MIT License (MIT)
//
// Copyright (c) 2015 Luis Alfredo Chee
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@fny
fny / GNU GPL Comment Headers.md
Last active April 23, 2024 23:04
GNU GPL formatted into a comment block and hard wrapped at 80 characters.

GNU GPL Comment Headers Formatted in Various Languages

A convenient reference for adding a GPL license to a work.

All prepared texts are hard wrapped at 80 characters unless stated otherwise.

No Wrap

@fardjad
fardjad / how-to-install-homebrew-on-debian-based-distros.md
Last active April 23, 2024 23:02
[How to Install Homebrew on Debian-based Distros] Steps required to install homebrew on MX Linux (and other Debian-based distros) #linux #debian #mxlinux #homebrew

How to Install Homebrew on Debian-based Distros

Steps required to install Homebrew on MX Linux (and other Debian-based distros)

Steps

  1. Update apt cache and optionally do a full upgrade

     apt update
    

apt full-upgrade # optional, reboot if needed

@mauricioaniche
mauricioaniche / adivinhacao.c
Created January 8, 2015 16:41
Código do jogo de adivinhação (fim do capítulo de tipos e operações)
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define NUMERO_DE_TENTATIVAS 3
int main() {
printf("************************************\n");
printf("* Bem vindo ao Jogo de Adivinhação *\n");
printf("************************************\n");
@mminer
mminer / MyService.swift
Last active April 23, 2024 23:00
Components of XPC service.
import Foundation
class MyService: NSObject, MyServiceProtocol {
func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) {
let response = string.uppercased()
reply(response)
}
}