Skip to content

Instantly share code, notes, and snippets.

View pilt's full-sized avatar

Simon Pantzare pilt

View GitHub Profile
@pilt
pilt / licensing.txt
Created November 27, 2024 09:41
Intric licensing
backend/
Extension MIT Total Files% MIT Lines Tot Lines Lines%
----------------------------------------------------------------------
.ini 0 2 0.0% 0 32 0.0%
.lock 0 1 0.0% 0 4606 0.0%
.mako 0 1 0.0% 0 17 0.0%
.py 50 455 11.0% 3314 27096 12.2%
.template 0 1 0.0% 0 40 0.0%
.toml 0 1 0.0% 0 73 0.0%
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.background {
fill: none;
pointer-events: all;
}
.feature {
### Keybase proof
I hereby claim:
* I am pilt on github.
* I am pilt (https://keybase.io/pilt) on keybase.
* I have a public key whose fingerprint is 1471 CD99 DDD9 52C2 9000 2C14 243B 7C0A 6685 D9B2
To claim this, I am signing this object:
@pilt
pilt / A.md
Last active August 29, 2015 14:04
Sverigedemokraternas valfilm

Transkription av Sverigedemokraternas valfilm. Det här tilltalar alltså en av tio svenskar?

tl;dr: Missnöje med etablissemanget, "eliten" och media. Invandring är orsaken till alla problem. Förrkärlek.

DROP TABLE IF EXISTS sender;
CREATE TABLE sender (
id INTEGER PRIMARY KEY,
name,
city
);
DROP TABLE IF EXISTS product;
CREATE TABLE product (
id INTEGER PRIMARY KEY,
((u'ebs', u'amd64', u'ap-northeast-1'), u'ami-eca719ed')
((u'ebs', u'i386', u'ap-northeast-1'), u'ami-eaa719eb')
((u'instance-store', u'amd64', u'ap-northeast-1'), u'ami-e0a719e1')
((u'instance-store', u'i386', u'ap-northeast-1'), u'ami-aca719ad')
((u'ebs', u'amd64', u'ap-southeast-1'), u'ami-fefcbcac')
((u'ebs', u'i386', u'ap-southeast-1'), u'ami-f8fcbcaa')
((u'instance-store', u'amd64', u'ap-southeast-1'), u'ami-fafcbca8')
((u'instance-store', u'i386', u'ap-southeast-1'), u'ami-d4fcbc86')
((u'ebs', u'amd64', u'ap-southeast-2'), u'ami-fb8611c1')
((u'ebs', u'i386', u'ap-southeast-2'), u'ami-858611bf')
from memsite.base.api.authorization import MemAuthorization
class DeviceAuthorization(MemAuthorization):
def apply_limits(self, request, object_list):
if request.user.is_authenticated():
return self.apply_user_profile_limits(request, object_list)
return object_list.none()
@pilt
pilt / foo.py
Created October 11, 2012 13:34
if "HTTP_AUTHORIZATION" in self.request.META:
authorization = self.request.META["HTTP_AUTHORIZATION"]
auth_type, auth_value = authorization.split()[0:2]
if auth_type.lower() == "basic":
credentials = "%s:%s" % (self.client.key, self.client.secret)
if auth_value != b64encode(credentials):
raise InvalidClient('Client authentication failed.')
else:
raise InvalidClient('Client authentication failed.')
else:
@pilt
pilt / about.md
Created August 31, 2012 20:45 — forked from FSX/about.md
Programming Achievements: How to Level Up as a Developer

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

*This gist is a fork of the gist from [this blog post][1] and this [Gist][2].

@pilt
pilt / sample_output.py
Created June 20, 2012 09:40
Scrape aws.amazon.com for Amazon Linux AMI ids
{('ebs', 'cluster_compute', 'us-east-1'): 'ami-e965ba80',
('ebs', 'cluster_gpu', 'us-east-1'): 'ami-fd65ba94',
('ebs', 'i386', 'ap-northeast-1'): 'ami-087acb09',
('ebs', 'i386', 'ap-southeast-1'): 'ami-b83374ea',
('ebs', 'i386', 'eu-west-1'): 'ami-fd231b89',
('ebs', 'i386', 'sa-east-1'): 'ami-aa855bb7',
('ebs', 'i386', 'us-east-1'): 'ami-ed65ba84',
('ebs', 'i386', 'us-west-1'): 'ami-978cd4d2',
('ebs', 'i386', 'us-west-2'): 'ami-38c64a08',
('ebs', 'x86_64', 'ap-northeast-1'): 'ami-e47acbe5',