Skip to content

Instantly share code, notes, and snippets.

View Ambient-Impact's full-sized avatar

Matei Stanca Ambient-Impact

View GitHub Profile
@RadGH
RadGH / phone-number.php
Last active May 31, 2023 08:00
Convert user-inputted phone number to consistently formatted HTML link, with extension support
<?php
// improved version: https://gist.github.com/RadGH/31f16cd4705a2d8076021a9ad528f34f
// ----------
// Example #1: HTML
$phone_number = '555.123.4567';
echo format_phone( $phone_number );
@JohnAlbin
JohnAlbin / SassMeister-input.scss
Created May 28, 2014 01:08
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
.component,
%component {
content: 'component';
&--variant {
@halcarleton
halcarleton / SublimeText-Project-Line-Count
Last active August 6, 2023 16:09 — forked from Hexodus/count_total_project_code_lines_in_sublime
Count total lines of code in a Sublime Text Project or Directory
Go to menu:
Find -> Find in Files... (windows: ctrl+shift+f)
Switch on reg_ex button (windows: alt+r)
Find:
^.*\S+.*$
Where:
c:\your_folder\,*.php,*.js,*.inc,*.html,*.htm,*.scss, -*/folder_to_exclude/*, -*.min.js
@juampynr
juampynr / mymodule.info
Last active June 9, 2023 21:53
Drupal 7 Views 3 custom field handler
dependencies[] = ctools
; Views Handlers
files[] = views/mymodule_handler_handlername.inc
@chrisl8888
chrisl8888 / drush.txt
Created August 22, 2012 20:07
fun advanced drush commands
# have drush rsync a particular file folder
drush rsync @dev:%files @local:%files --progress
# have sql-sync get the database from the server without cache
drush sql-sync @dev @local --no-cache
# have drush perform a git-pull
drush @site.dev gp