Skip to content

Instantly share code, notes, and snippets.

View szaboat's full-sized avatar

Attila Szabo szaboat

  • Budapest, Hungary
View GitHub Profile
@saurabhshri
saurabhshri / pip.md
Last active March 31, 2025 00:39
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

How?

@thirdy
thirdy / SocialistStarterPack.md
Last active August 16, 2024 06:10
Socialist Starter Pack
with
dau as (
-- This part of the query can be pretty much anything.
-- The only requirement is that it have three columns:
-- dt, user_id, inc_amt
-- Where dt is a date and user_id is some unique identifier for a user.
-- Each dt-user_id pair should be unique in this table.
-- inc_amt represents the amount of value that this user created on dt.
-- The most common case is
-- inc_amt = incremental revenue from the user on dt
@salomvary
salomvary / untitled.html
Created August 14, 2015 06:50
untitled.html
<!doctype html>
<html>
<head>
<title>Untitled</title>
</head>
<body>
</body>
</html>
@ochronus
ochronus / gmail_deflooder.py
Last active September 4, 2015 20:41
Delete messages from flooded labels
import imaplib
EMAIL_ADDRESS = '[email protected]'
PASSWORD = 'nope nope nope'
FOLDER = 'This_is_a_parent_label/this_is_a_sublabel'
while True:
try:
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login(EMAIL_ADDRESS, PASSWORD)

Elm Style Guide

Purpose

The goal of the style guide is foremost to promote consistency and reuse of pattern from other languages in order to improve readability and make Elm easier for beginners. This includes moving Elm away from Haskell’s indentation style and even making some parts look closer to JavaScript. These decisions are intentional.

We would like Elm to look friendly and familiar to users of any language — especially JavaScript — so they can discover Elm’s powerful features without being overwhelmed. This does not intend to weaken or discourage any features of Elm, but instead to make them more accessible.

A secondary goal of the style guide is to encourage short diffs when changes are made. This makes changes more clear, and helps when multiple people are collaborating.

Whitespace

@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing
@Nagyman
Nagyman / workflows-in-django.md
Last active November 20, 2024 01:08
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.