Skip to content

Instantly share code, notes, and snippets.

View catarinavclemente's full-sized avatar
🏠
Working from home

Catarina Clemente catarinavclemente

🏠
Working from home
View GitHub Profile
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@webchick
webchick / gist:956a2d7a49c7490fefb5
Last active December 3, 2019 09:25
Most popular D7 modules (as of July 16, 2015)
SELECT n.title, SUM(w.count) as total
FROM project_usage_week_release w
INNER JOIN field_data_field_release_project r ON w.nid = r.entity_id
INNER JOIN node n ON n.nid = r.field_release_project_target_id
INNER JOIN
field_data_field_release_version v ON v.entity_id = r.entity_id
WHERE LEFT(v.field_release_version_value, 3) = '7.x'
AND FROM_UNIXTIME(w.timestamp) BETWEEN CURDATE()-INTERVAL 2 WEEK AND CURDATE()
GROUP BY n.title
ORDER BY total DESC;