- You have Ghostscript installed, right? Otherwise
sudo apt-get install ghostscript
- This is important and installs the headers (
iapi.h
etc) which are required but don't come with the default Ghostscript package:sudo apt-get install libgs-dev
- I also needed
sudo apt-get install gs-esp
- For me the pre compiled version of ImageMagick never accepted Ghostscript, so let's remove it:
sudo apt-get --purge remove imagemagick
- Get the source of ImageMagick, untar it,
cd ImageMagick-xx
./configure --with-gslib=yes
[and what else you need]- Confirm in the output near the bottom
gslib yes yes
and notgslib yes no
make
make install
- Run
convert -list configure | grep DELEGATES
=>DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib
This file contains 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
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Symfony\Component\HttpFoundation\ParameterBag; | |
use Illuminate\Support\Arr; | |
/** | |
* @author https://github.com/Stunext |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:flutter_mobx/flutter_mobx.dart'; | |
import '../core/models/conversation_model.dart'; | |
import '../core/models/user_model.dart'; | |
class UserBar extends StatelessWidget implements PreferredSizeWidget { | |
final Conversation conversation; | |
// | |
UserBar(this.conversation); |
This file contains 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
# Add in ~/.bashrc or ~/.bash_profile | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
RED="\[\033[01;31m\]" | |
YELLOW="\[\033[01;33m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
NO_COLOR="\[\033[00m\]" |
Here are instructions for add Sass support to an app built with create-react-app. Hopefully this will be redundant when Sass support is built into the tool! Visit their form and let them know you need Sass support.
Install the create-react-app tool from npm. This will be installed globally. We also need to install the loaders needed for webpack, and we will save those as development dependencies.
npm install -g create-react-app
create-react-app your-app-name
cd your-app-name
This file contains 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
<?php | |
public function fileUploadAndResize(Request $request, $user) | |
{ | |
ini_set('memory_limit', '256M'); | |
if ($request->file('image')) { | |
$image = $request->file('image'); | |
$filename = uniqid($user->id) . '.' . $image->getClientOriginalExtension(); |
This file contains 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
CREATE TABLE `user` ( | |
`twitter_id` int(10) unsigned NOT NULL, | |
`name` varchar(140) NOT NULL, | |
`screen_name` varchar(30) NOT NULL, | |
`location` varchar(180) default NULL, | |
`description` varchar(300) default NULL, | |
`profile_image_url` varchar(400) NOT NULL, | |
`url` varchar(400) default NULL, | |
`protected` varchar(5) default NULL, | |
`followers_count` int(10) unsigned NOT NULL, |
This file contains 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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
Class Template{ | |
/* | |
* variables | |
*/ | |
/** |