Skip to content

Instantly share code, notes, and snippets.

View aldoah0a's full-sized avatar
💭
I may be slow to respond.

Ayed Aldossary aldoah0a

💭
I may be slow to respond.
View GitHub Profile
@jamesbrobb
jamesbrobb / multiform.py
Last active July 4, 2023 18:53 — forked from michelts/gist:1029336
django multiform mixin and view that allows the submission of a) All forms b) Grouped forms c) An individual form
class MultiFormMixin(ContextMixin):
form_classes = {}
prefixes = {}
success_urls = {}
grouped_forms = {}
initial = {}
prefix = None
success_url = None
@loshlee
loshlee / Slate Manager
Last active April 18, 2023 07:58
I use this AppleScript to launch Slate with the last used configuration, edit a slate configuration from a collection of .slate or .slate.js files using BBEdit (demo mode), or activate one of the collected configuration files in macOS. Slate is a souped up Window Manager (https://github.com/jigish/slate)
set default_settings to "# This is a sample .slate file.
# If no ~/.slate file exists, this is the file that will be used.
# Action summary
# ⌃⌥⌘0 - Show window locations for current screen
# ⌃⌥⌘1 - Move and resize front window to upper left corner
# ⌃⌥⌘2 - Move and resize front window to upper right corner
# ⌃⌥⌘3 - Move and resize front window to lower left corner
# ⌃⌥⌘4 - Move and resize front window to lower right corner
# ⌃⌘1 - Move and resize front window to left Half
@dwayne
dwayne / a-modern-frontend-dev.md
Last active March 21, 2021 11:38
Articles, tutorials and tools for modern front-end development.

Problem: What does a Modern Front-End Development Workflow Look Like?

I want to start writing libraries and large applications using the JavaScript language. However, I don't know how to setup the project and which build tools to use. What I do know is that the JavaScript community has moved way beyond using browser developer tool plugins and strategically-placed console.log() statements to debug, test, and build code.

I need help.

Below, I will keep track of articles, tutorials and tools I come across as I search for a way to bring my front-end development chops up-to-date.

The Ultimate Resource

#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
@arunkv
arunkv / gist:4137835
Created November 24, 2012 00:36
Arun's Slate Configuration
config defaultToCurrentScreen true
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
# Cmd+E brings up window chooser based on alphabet
bind e:cmd hint ASDFGHJKLQWERTYUIOPCVBN
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@spion
spion / a-warning.md
Last active July 10, 2024 15:21
C++ versus V8 versus luajit versus C benchmark - (hash) tables

Warning

This benchmark has been misleading for a while. It was originally made to demonstrate how JIT compilers can do all sorts of crazy stuff to your code - especially LuaJIT - and was meant to be a starting point of discussion about what exactly LuaJIT does and how.

As a result, its not indicative of what its performance may be on more realistic data. Differences can be expected because

  1. the text will not consist of hard-coded constants
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@gyndav
gyndav / gist:1820829
Created February 13, 2012 21:59
Using jinja2 within web.py
#!/usr/bin/env python
import os
import web
from jinja2 import Environment,FileSystemLoader
# Router
urls = (
"/.*", "hello",
'/contact', 'rsvp'
@emanuelez
emanuelez / git_speed.md
Last active July 1, 2024 05:18
Git Speed

How Fast is Git?

The web is full of benchmarks showing the supernatural speed of Git even with very big repositories, but unfortunately they use the wrong variable. Size is not important, but the number of files in the repository really is!

Why is that? Well, that's because Git works in a very different way compared to Synergy. You don't have to checkout a file in order to edit it; Git will do that for you automatically. But at what price?

The price is that for every Git operation that requires to know which files changed (git status, git commmit, etc etc) an lstat() call will be executed for every single file

Wow! So how does that perform on a fairly large repository? Let's find out! For this example I will use an example project, which has 19384 files in 1326 folders.