- 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"
- For Cmder icon:
- Commands (open Git's bash shell):
- Task parameters (set icon):
"C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: app/database/seeds/DatabaseSeeder.php | |
class DatabaseSeeder extends Seeder { | |
public function run() | |
{ | |
if (App::environment() === 'production') exit(); | |
Eloquent::unguard(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.3' | |
services: | |
mysql: | |
restart: always | |
image: mariadb:10.3 | |
container_name: mariadb | |
ports: | |
- "3307:3306" | |
volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); |