Skip to content

Instantly share code, notes, and snippets.

@mithereal
mithereal / smartd.conf
Created February 7, 2016 18:59
smartmon settings
# Sample configuration file for smartd. See man smartd.conf.
# Home page is: http://smartmontools.sourceforge.net
# $Id: smartd.conf 3651 2012-10-18 15:11:36Z samm2 $
# smartd will re-read the configuration file if it receives a HUP
# signal
# The file gives a list of devices to monitor using smartd, with one
@mithereal
mithereal / QuickGit.php
Last active July 1, 2016 22:03 — forked from lukeocodes/QuickGit.php
Current git version.
<?php
class QuickGit {
private $version;
function __construct() {
if(function_exists('exec')) {
exec('git describe --always',$version_mini_hash,$error);
if($error == 0 ){
exec('git rev-list HEAD | wc -l',$version_number);
exec('git log -1',$line);
@mithereal
mithereal / verify.php
Last active February 2, 2017 22:06
test filezilla fites in filezilla.xml for validity
<?php
//this will test and validate your filezilla exported sites ie filezilla.xml file run this in the dir filezilla.xml is ie
//'php verify.php filezilla.xml' or
//'php verify.php filezilla.xml verify' to validate ftp details
//an html file called filezilla_status will contain the ftp info
$xml_file = $argv[1];
if(isset($argv[1] && $argv[1] == "verify")){
$test_ftp = true;
@mithereal
mithereal / Site.Plug.Bot.Seo
Last active June 23, 2017 18:35
route bots to a custom route so we can seed them with seo friendly content via plug
defmodule Site.Plug.Bot.Seo do
import Plug.Conn
@doc """
This plug will route bots to a custom route so we can seed them with seo friendly content
requires (add to mix): {:ua_inspector, "~> 0.13" }
"""
@url "/to_url"
def init(options), do: options
// Brunch automatically concatenates all files in your
// watched paths. Those paths can be configured at
// config.paths.watched in "brunch-config.js".
//
// However, those files will only be executed if
// explicitly imported. The only exception are files
// in vendor, which are never wrapped in imports and
// therefore are always executed.
// Import dependencies
@mithereal
mithereal / brunch-config.js
Created September 28, 2017 00:04
brunch config
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: {
"js/landing/vendor.js": /^(bundled\/js\/landing|vendor|deps|node_modules).*/,
"js/page/vendor.js": /^(bundled\/js\/page|vendor|deps|node_modules).*/,
"js/quote/vendor.js": /^(bundled\/js\/quote|vendor|deps|node_modules).*/,
@mithereal
mithereal / filter.ex
Created January 3, 2018 17:06
elixir filter from a list
defmodule Filter do
@moduledoc """
this module will filter out results from a list via body or tail recursion
"""
@doc """
this will filter one result from the list via tail recursion
"""
@mithereal
mithereal / .zshrc
Last active February 1, 2018 00:35
install bfg repo cleaner in arch/antegros
function git_clean_passwords() {
if [ -n "$1" ]
then
java -jar $HOME/bin/bfg.jar --replace-text passwords.txt $1
else
java -jar $HOME/bin/bfg.jar
fi
}
@mithereal
mithereal / all_changes_mergify.sh
Last active August 8, 2018 22:56
fix for mergeify
#!/bin/bash
GIT=`which git`
for d in $(find -name \.mergify.yml);
do (
DIR=${d//.mergify.yml}
cd "$DIR" &&
${GIT} add --all .
${GIT} commit -m "fix mergify"
${GIT} push
@mithereal
mithereal / App.re
Last active August 27, 2018 21:01
bucklescript prob
open Belt ;
type state = {
| LOADING
| ERROR
| LOADED(id) ;
};
type searchType =
| zip ;