Skip to content

Instantly share code, notes, and snippets.

View lou's full-sized avatar

louis cuny lou

  • fr.getaround.com
  • paris
View GitHub Profile
@johndevs
johndevs / get-all-files.gql
Last active March 19, 2022 20:54
Github GraphQL - Get all file contents in repository
# Provide $query as a variable.
# The query is the same as you would enter into the search field e.g. "org:johndevs in:name feedreader"
query GetFilesQuery($branch: GitObjectID, $query: String!) {
search(first: 1, type: REPOSITORY, query: $query) {
edges {
node {
... on Repository {
object(expression: "master:", oid: $branch) {
... on Tree {
@Bahanix
Bahanix / post-checkout
Created June 4, 2018 11:14
post-checkout hook to display if you had stashed something on this branch
#!/bin/sh
STASH_NAME="$(git stash list | grep `git branch | grep \* | cut -d ' ' -f2` | head -n1 | cut -d':' -f1)"
if [ -n "$STASH_NAME" ]
then
echo "Last stash on this branch:"
git --no-pager stash show "$STASH_NAME" -p
echo "To keep your stash list clean, consider using one of the followings:"
echo "git stash pop \"$STASH_NAME\""
echo "git stash drop \"$STASH_NAME\""
@wycats
wycats / jsonapi.md
Created May 1, 2013 00:58
Ember APIs

JSON API

There are two JSON API styles:

  • The ID Style
  • The URL Style

The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.

The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@ryanb
ryanb / rails_3_1_rc4_changes.md
Created May 6, 2011 01:10
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 RC4

  • The new rake task assets:clean removes precompiled assets. [fxn]

  • Application and plugin generation run bundle install unless --skip-gemfile or --skip-bundle. [fxn]

  • Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]

  • Template generation for jdbcpostgresql #jruby [Vishnu Atrai]