Skip to content

Instantly share code, notes, and snippets.

View hexfusion's full-sized avatar
🐀
scampering

Sam Batschelet hexfusion

🐀
scampering
  • Red Hat
  • gRPC stream
View GitHub Profile
#!/bin/bash
PERL_STABLE="5.16.1"
echo '%< --- installing perlbrew ---'
echo
curl -kL http://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
perlbrew install --notest perl-${PERL_STABLE}
package # Hide from PAUSE
DBIx::Class::SQLMaker::SQLStatement;
use parent 'DBIx::Class::SQLMaker';
# SQL::Statement does not understand
# INSERT INTO $table DEFAULT VALUES
# Adjust SQL here instead
sub insert { # basically just a copy of the MySQL version...
my $self = shift;
#! /bin/bash
#
# Very basic init script for usage with eShop.
#
# Copyright 2013 Stefan Hornburg (Racke) <racke@linuxia.de>.
SOLR_HOME="$HOME/solr/example"
SOLR_LOGFILE=$(readlink -f ../../logs/solr.log)
SOLR_PIDFILE=$(readlink -f ../../run/solr.pid)

Buildable, Testable, Installable Git repo for Perl modules

tl;dr We might need a standard build file to build a module from Git repository, especially for the ones using Module::Install or dzil.

The problem

When an author of CPAN module uses an authoring tool that generates build files when shipping them to CPAN, the git repository usually doesn't have enough files to build, test and install the module.

For example, if dzil (Dist::Zilla) is used, the repository only conatains dist.ini and there's no Makefile.PL or Build.PL so standard CPAN installers or Continuous Integration tools don't know how to run tests on it.

#!/usr/bin/env perl
use strict;
use warnings;
use File::Spec;
use File::Copy::Recursive qw/rcopy/;
use File::Find;
use Data::Dumper;
use XML::Twig;
use File::Path qw/mkpath/;
@hexfusion
hexfusion / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hexfusion
hexfusion / gist:8f1dfbed3e2e5379f607
Created February 7, 2016 12:37 — forked from craigminihan/gist:b23c06afd9073ec32e0c
Build GCC 4.9.2 for C/C++ on CentOS 7
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install
@hexfusion
hexfusion / README.md
Created February 8, 2016 15:06 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@hexfusion
hexfusion / arch-linux-install
Last active December 12, 2016 18:14 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# This assumes a wifi only system...
@hexfusion
hexfusion / NVIDIAonLenovoP50andFedora 28.txt
Created November 28, 2018 13:46 — forked from kurtis318/NVIDIAonLenovoP50andFedora 28.txt
NVIDIA on Lenovo P50 and Fedora 28
I have a Lenovo P50 ThinkPad that I am issued at work. I run the latest Fedora on my primary laptop for years but
have avoided running the NVIDA graphics drivers because installation was manual and could break with kernel updates.
I updated my personal Dell XPS 15 to use the new NVIDIA drivers that are now supported in Fedora 28 I think these were suppose to come from rpm-fusion but it looks like they are in Fedora 28 tree, I could be wrong. The install was as easy as just installing the nvidia-driver package and reboot. This worked without any issues. I could launch nvidia-settings and glxgears without any issues.
The purpose of this Gist post is to document how I got the NVIDIA drivers from Fedora 28 on the P50. It was not as easy as installing nvidia-driver and rebooting.
For starters, here are the specs for the P50:
[root@kwr50p kurtis] # inxi -SG