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
module AsposeExpoter | |
Rjb::load(File.join(Rails.root, '/vendor/lib/Aspose.Words.jdk16.jar'), jvmargs=['-Djava.awt.headless=true']) | |
Rjb::import('com.aspose.words.License').new._invoke('setLicense', 'Ljava.io.InputStream;', Rjb::import('java.io.FileInputStream').new(Rjb::import('java.io.File').new(File.join(Rails.root, '/vendor/lib/Aspose.Words.lic')))) | |
TempFileRoot = '/tmp' | |
def to_data_xml_file | |
fn = File.join(TempFileRoot, "data-xml_#{id}_#{Time.now.to_i}.xml") | |
open(fn,'w') do |f| | |
f.write to_xml |
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
set encoding=utf-8 | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" Plugins | |
Plugin 'tpope/vim-dispatch' |
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 React from 'react'; | |
import consumer from '../channels/consumer'; | |
class NotificationsCount extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { count: this.props.count } | |
} |
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
YELLOW="\[\033[0;33m\]" | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w \$(parse_git_branch)$ " | |
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | |
export PATH="$PATH:$HOME/.rvm/bin" |
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
https://www.youtube.com/watch?v=ELUzf0MDQS0 | |
Hi guys in this video i will be showing how to Use your macbook pro with defekt AMD Radeon GPU using the Intel HD Graphics and Ubuntu OS. I think throw to the garbage a Macbook Pro is not the solution, so after lot of research i came with this Solution, Ubuntu runs awesome as well all the drivers and Functions of the Macbook. | |
Take a look here to the Steps as well follow the video for detailed steps: | |
Steps: | |
1. Download Ubuntu Desktop .iso from the official Ubundo Website | |
2. Create a booteable USB with the .iso file (use Rufus on windows, Unetbootin on linux) | |
3. Turn On the Macbook Pro, press ALT key to get into Boot Options |
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
# If you change this file, run 'update-grub' afterwards to update | |
# /boot/grub/grub.cfg. | |
# For full documentation of the options in this file, see: | |
# info -f grub -n 'Simple configuration' | |
GRUB_DEFAULT=0 | |
GRUB_TIMEOUT_STYLE=hidden | |
GRUB_TIMEOUT=0 | |
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0" |
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
#! /bin/sh | |
set -e | |
# grub-mkconfig helper script. | |
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc. | |
# | |
# GRUB is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
ffmpeg -i input_file.flv -vf "fps=10,scale=800:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output_file.gif |
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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
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
# frozen_string_literal: true | |
module Helpers | |
module MenuPatchHelper | |
# Renders the application main menu | |
def render_main_menu(project) | |
if menu_name = controller.current_menu(project) | |
render_menu(menu_name, project, class: 'nav nav-tabs') | |
end | |
end |