Skip to content

Instantly share code, notes, and snippets.

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

Mouhamadou DER derkhadim

🏠
Working from home
View GitHub Profile
@tenken
tenken / shortprofile.info
Created March 29, 2012 22:17
A Sample short profile that auto-fills the DB form, its a little ugly.
; dpg ::: http://drupal.org/user/1059226
; Example Short Profile -- hides database configuration page.
;
; This bears mentioning more than once. See http://drupal.org/node/1153646
name = Short Profile
description = A short profile, it removes DB settings page.
core = 7.x
dependencies[] = block
@jslegers
jslegers / style.scss
Created July 26, 2013 13:24
A CodePen by Hugo Giraudel. Sass mixin for scrollbar styling - Because I can't ever remember the right syntax for scrollbars styling in WebKit, here is a little Sass mixin to do it for you.
@import "compass";
/**
* Mixin scrollbar
*/
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) {
::-webkit-scrollbar {
width: $size;
height: $size;
}
@webchick
webchick / most_wanted
Created September 20, 2017 08:19
Top 50 "most wanted" Drupal 8 contrib modules (by followers in the "contrib_tracker" project)
mysql> SELECT n.nid, n.title, c.count AS followers
-> FROM node n
-> INNER JOIN flag_counts c ON c.entity_id = n.nid
-> INNER JOIN field_data_field_project p ON p.entity_id = n.nid
-> INNER JOIN field_data_field_issue_status s ON s.entity_id = n.nid
-> WHERE p.field_project_target_id = 2573607 /* contrib_tracker */
-> AND s.field_issue_status_value NOT IN (2, 7, 3) /* fixed, closed (fixed), closed (duplicate) */
-> ORDER BY c.count DESC
-> LIMIT 50;
+---------+-----------------------------------------------------------+-----------+
@qsypoq
qsypoq / devise.fr.yml
Last active October 19, 2018 09:10 — forked from GRoguelon/devise.fr.yml
French translation of devise.en.yml (version: 3.5.3).
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
fr:
devise:
confirmations:
confirmed: "Votre compte a été validé."
send_instructions: "Vous allez recevoir les instructions nécessaires à la confirmation de votre compte dans quelques minutes."
send_paranoid_instructions: "Si votre e-mail existe dans notre base de données, vous allez bientôt recevoir un e-mail contenant les instructions de confirmation de votre compte."
failure:
already_authenticated: "Vous êtes déjà connecté"
@vitorbritto
vitorbritto / add_apache_brew.md
Last active March 4, 2019 10:30
Install Apache with Homebrew

Install Apache with Homebrew

Installing Apache

# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"

and install Apache 2.2 with the event MPM, and we'll use Homebrew's OpenSSL library

@caike
caike / todo.jsx
Created April 11, 2015 13:02
Simple Todo app demo using React + ES6
var React = require("react");
var allItems = []
allItems.push("Buy ingredients for Crock Pot");
allItems.push("Pick up chair at IKEA");
allItems.push("Go see mom");
class TodoList extends React.Component {
constructor(props){
super(props);
fr:
admin:
js:
true: Vrai
false: Faux
is_present: Est présent
is_blank: Est vide
date: Date ...
between_and_: Entre le ... et le ...
today: "Aujourd'hui"
@gabceb
gabceb / gist:5113767
Created March 8, 2013 02:27
Handling 404, 401 and 500 exceptions on Rails
class ApplicationController < ActionController::Base
unless Rails.application.config.consider_all_requests_local
#rescue_from Exception, with: :render_500
rescue_from ActionController::RoutingError, with: :render_canvas_404
rescue_from ActionController::UnknownController, with: :render_404
rescue_from AbstractController::ActionNotFound, with: :render_404
rescue_from ActiveRecord::RecordNotFound, with: :render_404
rescue_from ActiveResource::ForbiddenAccess, with: :render_403
end
@seyhunak
seyhunak / seeds.rb
Created December 7, 2013 14:54
Rails - Import SQL file as seed
unless Rails.env.production?
connection = ActiveRecord::Base.connection
connection.tables.each do |table|
connection.execute("TRUNCATE #{table}") unless table == "schema_migrations"
end
sql = File.read('db/import.sql')
statements = sql.split(/;$/)
statements.pop
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks