Skip to content

Instantly share code, notes, and snippets.

View thiagoghisi's full-sized avatar
🖊️
Writing a book about Career Dev.

Thiago Ghisi thiagoghisi

🖊️
Writing a book about Career Dev.
View GitHub Profile
@borischerkasky
borischerkasky / full_script.rb
Created August 11, 2019 19:18
full Github PR statistics script
class TeamPrStatistics
attr_accessor :team, :stats
class Stat
attr_accessor :titles
attr_reader :name
def initialize(name)
@name = name
@titles = []
end
@gusbicalho
gusbicalho / start-here-you-are-not-so-smart.md
Last active November 11, 2022 14:49
A roadmap of interesting books

START HERE: You are not so smart

I recomend reading at least two of the above.

If you feel like you know enough about how your mind is fucked-up miscalibrated, you can move on to the lists below. Each one has a few sublists. The order of the sublists does not matter. For each sublist, the first link is the one I see as a good starting point, but the order does not matter too much, either.

@mislav
mislav / hub-api-comments.sh
Last active January 24, 2024 23:38
hub api example of how to fetch all comments over GraphQL
comments() {
local issue="${1?}"
shift 1
paginate hub api --cache 3600 graphql -F issue="$issue" "$@" -f query='
query ($owner: String = "{owner}", $repo: String = "{repo}", $issue: Int!, $per_page: Int = 30, $after: String) {
repository(owner: $owner, name: $repo) {
issueOrPullRequest(number: $issue) {
... on Issue {
comments(first: $per_page, after: $after) {
...Comments
import os
from collections import defaultdict
import requests # get from pypi
import crayons # get from pypi
pagination = "null"
query = """
query($orderBy: LanguageOrder!, $pagination: String) {
viewer {
name
@bcm
bcm / dapx-web-eng-coding-assignment.md
Last active April 15, 2019 21:19
Coding Assignment - Web Engineer, Acquisitions Engineering

For this exercise you will create a web page that embeds a photo carousel based on a Flickr gallery (Flickr API details here: https://www.flickr.com/services/api/flickr.galleries.getPhotos.html).

  1. Create a web page (the embedding page) that embeds the content of a second web page (the embedded page) in an iframe. The embedded page should allow the user to submit the ID of a Flickr gallery.
  2. When the user submits a gallery ID, the embedded page should fetch photos from the identified Flickr gallery and display them in thumbnail form in a photo carousel.
  3. When the user clicks on a thumbnail in the carousel to select it, the embedding page should be updated to display metadata about that photo, including the owner's name, the date it was taken, and the number of times the photo has been viewed.
  4. When the user clicks on a selected thumbnail to deselect it, the corresponding photo metadata should be cleared from the embedding page.

Hint: If you find yourself making more than one request to the

@samrocketman
samrocketman / libimobiledevice_ifuse_Ubuntu.md
Last active July 3, 2024 07:05
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Audience

Who is this guide intended for?

@justanr
justanr / commandbus.py
Last active May 24, 2016 04:10
Basic Command Bus example
import inspect
class HandlerNotFound(Exception):
pass
class BasicCommandBus(object):
def execute(self, command):
@justanr
justanr / base_repository.py
Last active May 24, 2016 04:13
Toy Repository
from operator import attrgetter
from hashlib import md5 # because it's fast
class BaseRepository(object):
def find(self, pk):
raise NotImplementedError()
def find_by(self, **keys):
raise NotImplementedError()
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@aviflax
aviflax / notes.md
Last active October 3, 2020 22:53
My Notes on “Consumer-Driven Contracts: A Service Evolution Pattern”

My Notes on “Consumer-Driven Contracts: A Service Evolution Pattern”

My notes

  • This article is not exactly cutting-edge — I arrived at similar conclusions years ago
  • Many of the problems are related to XML and XSD and the excessive use of XSD validation that was popular in the SOA community 6–10 years ago