Skip to content

Instantly share code, notes, and snippets.

@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@themsaid
themsaid / HasEnums.php
Last active August 29, 2020 23:23
PHP Enumerated Type
trait HasEnums
{
/**
* The array of enumerators of a given group.
*
* @param null|string $group
* @return array
*/
static function enums($group = null)
{
@gocanto
gocanto / .travis.yml
Last active September 29, 2018 08:06
MySQL 5.7 Travis CI configuration
language: php
php:
- 7.0
- 7.1
services:
- mysql
addons:
@laracasts
laracasts / Accordion.vue
Created May 25, 2018 20:39
vuecasts.com - episode 41 source code.
<template>
<div>
<accordion-item
v-for="(item, index) in items"
:title="item[titleName]"
:body="item[bodyName]"
:key="index"
:is-open="activeItemIndex == index"
@toggled="onToggle"
></accordion-item>
@mpdude
mpdude / fix-cs-php.yml
Last active May 14, 2024 22:20
GitHub Actions workflow to open PRs for php-cs-fixer changes
# Update this by running
# curl https://gist.github.com/mpdude/ca93a185bcbf56eb7e341632ad4f8263/raw/fix-cs-php.yml > .github/workflows/fix-cs-php.yml
on:
push:
branches:
- master
pull_request:
name: Coding Standards
@Jibbarth
Jibbarth / 1.PHP_OAuth_CLI.md
Last active April 22, 2024 23:34
⚡Recreate Github CLI OAuth feature in a Symfony command ⚡

⚡Recreate Github CLI OAuth feature in a Symfony command ⚡

Github recently released a CLI tool to manage issues and PR directly from your terminal. As I work on some open source projects, I downloaded it to give a try.

And at first launch, the CLI ask to connect by using OAuth. It propose to press "Enter" to open github.com in my browser, and catch correctly the access_token.

That .. blown my mind 🤯 I didn't expect we can connect through terminal like this. So, as it's open source, I dived into the code source.

@mtimbs
mtimbs / tsconfig.json
Last active June 29, 2024 17:03
basic default tsconfig for use in TypeScript projects
{
"compilerOptions": {
// project options
"lib": [
"ESNext",
"dom"
], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)