Skip to content

Instantly share code, notes, and snippets.

View jclaveau's full-sized avatar

Jean Claveau jclaveau

  • Freelancer
  • Paris
View GitHub Profile
@cecilemuller
cecilemuller / example.yml
Created October 20, 2020 01:49
Run Docker Compose + in Github Action
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches:
@ahaggart
ahaggart / X1C6_S3_DSDT.patch
Created July 26, 2018 07:05
The patch for the Thinkpad X1 Carbon sleep patch guide
--- dsdt.dsl 2018-03-03 14:47:12.279105691 +0100
+++ dsdt.dsl 2018-03-03 14:26:30.606427931 +0100
@@ -18,9 +18,8 @@
* Compiler ID "INTL"
* Compiler Version 0x20160527 (538314023)
*/
-DefinitionBlock ("", "DSDT", 2, "LENOVO", "SKL ", 0x00000000)
+DefinitionBlock ("", "DSDT", 2, "LENOVO", "SKL ", 0x00000001)
{
- External (_GPE.TBNF, MethodObj) // 0 Arguments
@mlocati
mlocati / exceptions-tree.php
Created March 9, 2017 10:58
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@colemanw
colemanw / font-awesome-mime-type-icons.php
Last active March 11, 2024 04:21 — forked from guedressel/font-awesome-mime-type-icons.php
Font Awesome File Icons: Mapping MIME Types to correct icon classes
<?php
/**
* Get font awesome file icon class for specific MIME Type
* @see https://gist.github.com/guedressel/0daa170c0fde65ce5551
*
*/
function ($mime_type) {
// List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml
$icon_classes = array(
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active May 16, 2024 01:04
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@simonsmith
simonsmith / amd-jquery-plugin.js
Last active April 29, 2020 15:28
AMD compatible plugin for jQuery
// UMD dance - https://github.com/umdjs/umd
!function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(root.jQuery);
}
}(this, function($) {
'use strict';