Skip to content

Instantly share code, notes, and snippets.

View Oxicode's full-sized avatar

Christian QH ✔ Oxicode

View GitHub Profile
@chimit
chimit / bitbucket-pipelines.yml
Created August 7, 2020 02:35
Bitbucket Pipelines config for Laravel 7 with PHP 7.4, GD and EXIF
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.4-fpm
definitions:
services:
mysql:
@Graciaira
Graciaira / color_imaging.m
Created May 14, 2020 14:50 — forked from mrifkikurniawan/color_imaging.m
Get 3 color channels, RGB, of image, and stack it together to get color image.
clear all;
%Read the image
img = imread('image.jpg');
%Get the size (rows and columns) of the image
[r,c] = size(img);
rr=r/3;
%Wrire code to split the image into three equal parts and store them in B, G, R channels
B=imcrop(img,[1,1,c,rr-1]);
@maxca
maxca / mysql-redis-docker-compose.yml
Created December 13, 2018 08:32
mysql-redis-docker-compose.yml
version: '2.3'
services:
mysql:
restart: always
image: mariadb:10.3
container_name: mariadb
ports:
- "3307:3306"
volumes:
@snewell92
snewell92 / mysql.js
Created June 2, 2017 16:01
Sequelize ES6 model syntax
var Promise = require('bluebird');
const Sequelize = require('sequelize');
const fs = Promise.promisifyAll(require('fs'));
const _ = require('lodash');
const sequelize = new Sequelize(connectionString, {
dialect: 'mysql',
logging: false,
pool: { // application-side connection pool configuration
#!/bin/sh -x
# Script usage example
# sudo sh azure-disk.sh /dev/sdc /datadisk
DEVICE="$1"
MOUNT_DIR="$2"
sfdisk $DEVICE << EOF
start=2048, type=83
@brunogaspar
brunogaspar / README.md
Last active October 7, 2022 09:08
Install wkhtmltopdf on Ubuntu (14.04 64-bit) or (16.04 64-bit)

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Installation

@nickautomatic
nickautomatic / cmder.md
Last active September 20, 2023 13:59
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
@brianmacarthur
brianmacarthur / flash-app.js
Last active July 10, 2023 18:41
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines
@csrui
csrui / gulpfile.js
Created April 11, 2014 16:27
Generic gulpfile for CakePHP apps. Compiles and minifies sass. Minifies and lints javascript. Generates documentation with yuidoc
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
var yuidoc = require("gulp-yuidoc");
@asaskevich
asaskevich / run.bat
Last active May 5, 2017 14:56
Compile and run C# app from command line
@echo off
:: Making directory for executable files
md build
set /p fName=Write source name:
:: Csharp compiler must be in %PATH%
csc.exe %fName%.cs
:: Move executable file to directory
move %fName%.exe build/
cd build
cls