Skip to content

Instantly share code, notes, and snippets.

View JoseCage's full-sized avatar
:octocat:
Opensourcing

José Cage JoseCage

:octocat:
Opensourcing
View GitHub Profile
@paulmillr
paulmillr / active.md
Last active April 1, 2026 19:37
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@sgmurphy
sgmurphy / url_slug.php
Created July 12, 2012 15:52
URL Slugs in PHP (with UTF-8 and Transliteration Support)
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
@zachbrowne
zachbrowne / commands.txt
Created August 10, 2012 04:04
Ubuntu Commands Cheat Sheet
# Commands to backup a website from root access to ssh with mysql database
cd to directory of website
# Compress
tar czf filename.tar.gz *
mysqldump -u root -ppassword databasename | gzip -9 > filename.sql.gz
# Decompress
tar xzf filename.tar.gz
gunzip filename.sql.gz
@andylolz
andylolz / gist:3885906
Created October 13, 2012 19:49
Laravel question

The problem

So this isn’t my actual scenario, but I think it illustrates my problem quite well. Imagine an online school report system. I have Teachers, Students, and Reports. Teachers and Students are both Users. The relationship between Students and Reports is one-to-one (a student just has a single report card), but between Teachers and Reports is one-to-many (a teacher has a whole classroom-worth of reports.) The Report model has both a student_id and a teacher_id, both of which are foreign keys to the User table.

I’d like to represent these relationships in my models, so for a given User I can call:

User::find(5)->reports;
@erkobridee
erkobridee / nodejs-windows-empresas.md
Last active September 13, 2024 17:26
Utilizando o Node.js em um Windows sem Administrador

Utilizando o Node.js em um Windows sem Administrador

Cenário: ambiente corporativo, máquinas Windows XP e usuário sem permissão de administração.

Observação: embora o cenário descrito seja o Windows XP, os passos para o Windows 7 são bem parecidos.

--

TODO: observar Yeoman behind a (corporate) proxy

@balupton
balupton / docpad.coffee
Last active July 27, 2016 10:40
DocPad: Automatically set custom Meta Data for items in a Collection
# Define our Configuration
docpadConfig =
# Define our own Collections
collections:
# Posts
# Anything outputted to the posts directory can be considered a post
# Sort the posts by newest first
# And set their layout to `post` automatically if it isn't already set
@anchetaWern
anchetaWern / laravel-ums.markdown
Created December 6, 2012 11:14
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@kapkaev
kapkaev / gist:4619127
Created January 24, 2013 09:30
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
$ redis-cli
> config set stop-writes-on-bgsave-error no
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working
@kxhitiz
kxhitiz / gist:4952218
Created February 14, 2013 11:26
HTTParty Header Token Authentication
HTTParty.get "http://localhost:3000/teams.json", :headers=>{"Authorization"=>"Token token=\"a8d8ce14d2402a2e1912c25f39df770b\""}