Skip to content

Instantly share code, notes, and snippets.

View git2samus's full-sized avatar

Michael Cetrulo git2samus

View GitHub Profile
@git2samus
git2samus / disable_reddit_collections.user.js
Created March 27, 2021 13:15
Disable Reddit collections
// ==UserScript==
// @name Disable Reddit collections
// @namespace https://github.com/git2samus/
// @version 0.1
// @description Revert Reddit collections layout on the new design
// @author git2samus
// @match https://www.reddit.com/r/*/comments/*
// @grant none
// ==/UserScript==
import os
from datetime import datetime
from praw import Reddit
reddit = Reddit(**{
key: os.getenv(f"REDDIT_{key.upper()}")
for key in (
"client_id", "client_secret", "username", "password", "user_agent"
)
})
Antel: 200.40.220.245 / 200.40.30.245
https://twitter.com/AntelDeTodos/status/296971396746199043
OpenDNS: 208.67.222.222 / 208.67.220.220
https://use.opendns.com/
Google: 8.8.8.8 / 8.8.4.4
https://developers.google.com/speed/public-dns/
@git2samus
git2samus / bot.py
Last active November 13, 2015 20:31 — forked from anonymous/bot.py
from gamebot import GameBot
class Bot(GameBot):
# Possible directions where a unit can move to
# self.NW, self.N, self.NE, self.E, self.SE, self.S, self.SW, self.W
# game_map : Is a python dictionary:
# - key = (x, y) that indicates a coordinate. x and y are integers.
# - value = a Tile object.
from django import forms
from students.models import Student, Longlist
class StudentForm(forms.ModelForm):
class Meta:
model = Student
fields= ('name_text',)
@git2samus
git2samus / frases.py
Created August 11, 2015 21:10
Frases Sinergia
#!/usr/bin/env python
import sys, random
if __name__ == '__main__':
if len(sys.argv) < 2:
print "ERROR: Se debe pasar la ruta del archivo de frases como parametro"
else:
with open(sys.argv[1]) as f:
frases = [text.strip() for text in f.read().split('\n') if text.strip()]
random.shuffle(frases)
@git2samus
git2samus / get_default.py
Created May 14, 2015 03:46
get the list of default subreddits as a multisub
#!/usr/bin/env python3
import requests
default_json = requests.get('https://www.reddit.com/subreddits/default.json').json()
names = (child['data']['display_name'] for child in default_json['data']['children'])
print('http://www.reddit.com/r/{}'.format('+'.join(names)))
/home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site/gems/super_originality_detector-0.8.2/lib/google_custom_search.rb:2: warning: already initialized constant VERIFY_PEER
/home/samus/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -I/home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site/gems/rspec-core-3.2.2/lib:/home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site/gems/rspec-support-3.2.2/lib /home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site/gems/rspec-core-3.2.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site/gems/super_originality_detector-0.8.2/lib/google_custom_search.rb:2: warning: already initialized constant VERIFY_PEER
WARNING: Sinatra 1.2.x has reached its EOL. Please upgrade.
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
...The "fb-root" div has not been created, auto-creating
Invalid App Id: Must be a number or numeric s
@git2samus
git2samus / UX Review - PaperRater.md
Last active August 29, 2015 14:17
UX Review - PaperRater

UX review - PaperRater.com

General Comments

These comments apply to the site as whole.

Load time

The page loads pretty fast and that's good, there's however many improvements that can be done such as caching of assets, etc.

RubyGems Environment:
- RUBYGEMS VERSION: 2.4.6
- RUBY VERSION: 1.9.3 (2014-11-13 patchlevel 551) [i686-linux]
- INSTALLATION DIRECTORY: /home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site
- RUBY EXECUTABLE: /home/samus/.rvm/rubies/ruby-1.9.3-p551/bin/ruby
- EXECUTABLE DIRECTORY: /home/samus/.rvm/gems/ruby-1.9.3-p551@ppr_site/bin
- SPEC CACHE DIRECTORY: /home/samus/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/samus/.rvm/rubies/ruby-1.9.3-p551/etc
- RUBYGEMS PLATFORMS:
- ruby