Skip to content

Instantly share code, notes, and snippets.

View ktquez's full-sized avatar
:octocat:
Creating cool and open source stuff

Alan Ktquez ktquez

:octocat:
Creating cool and open source stuff
View GitHub Profile
@sohelamin
sohelamin / lumen-resource-route.php
Created April 20, 2015 18:34
Lumen Resource Routing
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
@ben-albon
ben-albon / php5.6-pgsql.Dockerfile
Last active June 7, 2025 03:48
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
import {join} from 'path';
import webpack from 'webpack';
import {merge} from 'lodash';
import WebpackDevServer from 'webpack-dev-server';
import makeConfig from './make-config';
export default function(gulp, plugins, config) {
var {ENV, site, port} = config;
var {gutil, browserSync} = plugins;
const isDev = ENV === 'DEV';
@IamSwap
IamSwap / Basic Vue Router Example.md
Last active February 24, 2020 20:36
Basic Vue Router Example
@renchap
renchap / README.md
Last active February 14, 2025 13:25
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@vaalentin
vaalentin / package.json
Last active January 27, 2017 10:27
Webpack1 config files
{
"scripts": {
"start": "webpack-dev-server --config webpack.dev.config.js",
"clean": "rm -rf ./dist",
"build": "webpack --config webpack.prod.config.js --progress"
}
}
@wesbos
wesbos / css-variables.js
Last active August 11, 2021 14:23
Test for CSS Variables
function testCSSVariables() {
var color = 'rgb(255, 198, 0)';
var el = document.createElement('span');
el.style.setProperty('--color', color);
el.style.setProperty('background', 'var(--color)');
document.body.appendChild(el);
var styles = getComputedStyle(el);
var doesSupport = styles.backgroundColor === color;
@dewey92
dewey92 / home.js
Created March 3, 2016 07:17
Vue router
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
Vue.use(require('vue-resource'))
const router = new VueRouter({
history : true,
saveScrollPosition: true
});
@laracasts
laracasts / Alert.vue
Created March 15, 2016 02:36
Alert .vue example.
<template>
<div class="Alert Alert--{{ type | capitalize }}">
<slot></slot>
</div>
</template>
<script>
export default {
props: {
type: {
@deckvig
deckvig / gulpfile.js
Last active May 3, 2018 13:38
Laravel gulp-vue-webpack config
var elixir = require('laravel-elixir');
require('laravel-elixir-webpack');
elixir(function (mix) {
mix.webpack('./resources/assets/js/app.js',{
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',