Skip to content

Instantly share code, notes, and snippets.

@FUT
FUT / install-redis.sh
Last active March 2, 2025 12:35
Install Redis on EC2
1. Install Linux updates, set time zones, followed by GCC and Make
sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)
@DanDiplo
DanDiplo / JS-LINQ.js
Last active October 14, 2025 22:02
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@danfickle
danfickle / app.component.ts
Created January 17, 2016 08:09
Simple multi select dropdown component for Angular 2.
import {Component} from 'angular2/core';
import {MutliSelectDropdownComponent, DropdownItem, DropdownSelectionItem} from './multiselect.component';
/*
* Example usage of a simple multi select dropdown for angular 2.
* See component for more information.
*/
@Component({
selector: 'my-app',
directives: [MutliSelectDropdownComponent],
@rtimmons
rtimmons / slides.md
Created June 21, 2018 18:11
Learning C++ The Hard Way

Welcome

Who is this guy?

Goal(s)

  1. Don't WTF quite so much when looking at C++ PRs
  2. Know what you don't know (so you know what to look up to learn more)

Agenda

@scanzy
scanzy / tewaker.py
Created April 28, 2023 11:00
Set custom id/class in Streamlit, and inject css/js
import random as rd
import functools as ft
import streamlit as st
import streamlit.components.v1 as components
# Domanda: come applicare stili css solo ad alcuni elementi streamlit?
# Risposta: iniettare js che aggiorni id e classe dell'elemento precedente