Skip to content

Instantly share code, notes, and snippets.

# coding: utf-8
require 'active_support/core_ext/array'
require 'active_support/core_ext/string/inflections'
module Pod
# Validates a Specification.
#
# Extends the Linter from the Core to add additional which require the
# LocalPod and the Installer.
#
@verdverm
verdverm / backup.sh
Created October 14, 2020 18:49
HN Upvotes Backup and JSONify
#!/usr/bin/env bash
set -euo pipefail
COOKIE="user=verdverm&..."
USERNAME="verdverm"
BASEURL="https://news.ycombinator.com/upvoted"
PAGE=0
mkdir -p html

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@caryoscelus
caryoscelus / shell.nix
Created September 21, 2023 12:51
run games in nixos shell.nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "launch-env";
targetPkgs = pkgs: (with pkgs; [
udev
alsa-lib
fontconfig
libxkbcommon
libGL
// John Tantalo
jQuery.fn.chain = function (fn)
{
var self = this;
return function ()
{
if (!self.size()) return;
fn(self.eq(0), self.slice(1).chain(fn));
}
@pb111
pb111 / Logistic Regression with Python and Scikit-Learn.ipynb
Created May 6, 2019 01:28
Logistic Regression with Python and Scikit-Learn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kyounger
kyounger / init.lua
Created July 25, 2020 04:45
hammerspoon draw box and obtain coordinates
hs.hotkey.bind(modShiftHyper, "W", function()
-- local tracking = false
local startingMousePosition = hs.mouse.getAbsolutePosition()
local max = hs.screen.mainScreen():fullFrame()
local maxCanvas = hs.canvas.new{x=max.x, y=max.y, h=max.h, w=max.w}
maxCanvas:clickActivating(false)
maxCanvas:canvasMouseEvents(true, true, false, true)
maxCanvas:mouseCallback(function(_, event, id, x, y)
local currentMousePosition = hs.mouse.getAbsolutePosition()
@Klerith
Klerith / vite-testing-config.md
Last active May 5, 2024 16:20
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 5, 2024 16:18
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
// http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html
jQuery.githubUser = function(username, callback) {
jQuery.getJSON("http://github.com/api/v1/json/" + username + "?callback=?", callback);
}
jQuery.fn.loadRepositores = function(username) {
this.html("<span>Querying GitHub for repositories...</span>");
var target = this;