Skip to content

Instantly share code, notes, and snippets.

View rootux's full-sized avatar
🌴
Crafting

Gal Bracha rootux

🌴
Crafting
View GitHub Profile
@joekiller
joekiller / gtk-firefox.sh
Last active October 1, 2024 21:25 — forked from phstc/gtk-firefox.sh
INSTALL FIREFOX ON AMAZON LINUX X86_64 COMPILING GTK+
#!/bin/bash
# GTK+ and Firefox for Amazon Linux
# Written by Joseph Lawson 2012-06-03
# http://joekiller.com
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/
# chmod 755 ./gtk-firefox.sh
# sudo ./gtk-firefox.sh
@sloria
sloria / bobp-python.md
Last active November 14, 2024 15:01
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@oronbz
oronbz / soundPlayer AngularJS Service
Last active August 14, 2018 13:45
This is a soundPlayer for AngularJS using the soundManager2 API.
// download soundManager2 and refer it in your scripts http://www.schillmania.com/projects/soundmanager2/doc/download/#latest
// also add the swf directory to your project
// your module declaration
var app = angular.module('myApp', []);
// attach the soundManager global for AngularJS dependency injection
app.value('soundManager', soundManager);
// usage
@glenrobertson
glenrobertson / flask_cache_response_decorator.py
Last active January 15, 2022 21:15
Flask response cache decorator
import datetime
import time
from functools import wraps
from wsgiref.handlers import format_date_time
from flask import make_response
def cache(expires=None, round_to_minute=False):
"""
Add Flask cache response headers based on expires in seconds.
var Headout = {
apply: function() {
return true;
},
code: function() {
console.log("I", this.a.join(' '), 'code at Headout');
this.a = [];
return this;
},
a: []
@ldong
ldong / download_egghead_videos.md
Last active December 7, 2023 16:16
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@PaulTaykalo
PaulTaykalo / Appfile
Created August 26, 2016 13:05
Fastlane's Appfile for multiple users support
# In big teams instead of specifying one email to rule them all as apple_id
# You can get this information from environment variable
# By doing this it will allow different developers to specify their own apple ids
# And if this env variable is not required - then it will be asked on any command that requires apple_id
apple_id ENV["MY_APP_NAME_APPLE_ID"] # Your Apple email address
### ~/.bashrc of some user
export MY_APP_NAME_APPLE_ID="[email protected]"
@jh0ker
jh0ker / mwt.py
Last active February 3, 2023 20:38
Memoize-with-timeout decorator
#!/usr/bin/env python
# Source: http://code.activestate.com/recipes/325905-memoize-decorator-with-timeout/#c1
import time
from functools import wraps
class MWT:
"""Memoize With Timeout"""
_caches = {}
_timeouts = {}