Skip to content

Instantly share code, notes, and snippets.

View the-cc-dev's full-sized avatar
💭
searching for inspiration.

Cat the-cc-dev

💭
searching for inspiration.
View GitHub Profile
@paulirish
paulirish / data-markdown.user.js
Last active October 22, 2024 14:19
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@alana-mullen
alana-mullen / Detect the last post in the WordPress loop
Last active May 29, 2023 16:50
Detect the last post in the WordPress loop
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) {
echo 'This is the last post';
} ?>
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) {
echo 'This is the not the last post';
} ?>
@rxaviers
rxaviers / gist:7360908
Last active April 18, 2025 18:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active February 27, 2025 20:09
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@mabasic
mabasic / environment.php
Last active December 20, 2019 02:47
Laravel - detectEnvironment
<?php
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
@mabasic
mabasic / ArrayValidation.php
Last active December 20, 2019 02:48
Custom Array Validation for Laravel
<?php
class ArrayValidation extends Illuminate\Validation\Validator
{
public function validatePeriodArray($field, $values, $params)
{
$valid = true;
foreach($values as $value)
{
@digisavvy
digisavvy / gulpfile.js
Created September 22, 2014 17:05
Gulpfile config
// Load plugins
var gulp = require('gulp'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
@mabasic
mabasic / NewRelicAppName.php
Created April 16, 2015 10:54
Add this to your PHP Application to set Application Name for New Relic monitoring.
/*
|--------------------------------------------------------------------------
| New Relic App Name
|--------------------------------------------------------------------------
|
| If the extension `newrelic` is loaded then
| set the name of the app to something.
|
*/
@mabasic
mabasic / Envoy.blade.php
Last active December 20, 2019 02:48
Envoy common features
@servers(['web' => '[email protected] -p 1234'])
@setup
$path = "/path/to/site";
@endsetup
@task('down')
cd {{ $path }}
php artisan down
@endtask
@mabasic
mabasic / Envoy.blade.php
Last active June 5, 2023 05:01
Envoy common features with Slack notifications. See http://laravel.com/docs/5.0/envoy for more info.
@servers(['web' => '[email protected] -p 1234'])
@setup
$project_name = 'Project Name';
$project_url = 'http://project-domain.com/';
$project_root = '/www/project/web';
$slack_hook = 'your-slack-hook-url';
$slack_channel = '#channel';
@endsetup