Skip to content

Instantly share code, notes, and snippets.

View artoodetoo's full-sized avatar
:octocat:
gitting

Alexandr Materukhin artoodetoo

:octocat:
gitting
View GitHub Profile
@pamelafox
pamelafox / autoresizer.js
Created March 22, 2012 06:11
TextArea AutoResizer (Bootstrap jQuery/Zepto Plugin)
var AutoResizer = function (textArea, options) {
var self = this;
this.$textArea = $(textArea);
this.minHeight = this.$textArea.height();
this.options = $.extend({}, $.fn.autoResizer.defaults, options)
this.$shadowArea = $('<div></div>').css({
@docteurklein
docteurklein / SetServiceDecoratorPass.php
Created October 25, 2013 13:33
Decorate services with other services
<?php
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\Reference;
class SetServiceDecoratorPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
@franzliedke
franzliedke / README.md
Created June 9, 2013 13:27
FluxBB Authentication Plugin for DokuWiki

Installation

In your DokuWiki installation, create a folder lib/plugins/authfluxbb/ and create the two files auth.php and plugin.info.txt in it.

In your wiki's conf/local.protected.php (create this file if it does not exist), add the following lines:

$conf['authtype'] = 'authfluxbb';
$conf['superuser'] = '@Administrators,@Moderators';

// Make sure stripping slashes doesn't clash with the forums.

@HTMLGuyLLC
HTMLGuyLLC / cacert.pem
Created June 6, 2013 03:40
cacert.pem to create a secure connection to APIs
##
## ca-bundle.crt -- Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
##
@ecerulm
ecerulm / diffmerge-diff.sh
Created August 5, 2010 15:46
Cygwin Git: wrappers for diffmerge and winmerge
#!/bin/sh
# Use SourceGear DiffMerge as mergetool for git in cygwin.
# git config --global mergetool.diffmerge.cmd "diffmergetool.sh \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\""
# git config --global mergetool.diffmerge.trustExitCode false
# git difftool -t diffmerge branch1..branch2
# Reference: http://www.tldp.org/LDP/abs/abs-guide.pdf
library=githelperfunctions.sh
@meganlkm
meganlkm / laravel5_shared_hosting_project.sh
Last active January 3, 2019 19:49
setup a laravel5 project to deploy to a shared hosting provider
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public
@slouma2000
slouma2000 / install_ruby_1.9.3
Last active May 14, 2019 20:27
Install Ruby 1.9.3 on CentOS, RedHat using RVM
Step 1: Upgrade Packages
# yum update
# yum groupinstall "Development Tools"
Step 2: Installing Recommended Packages
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum install libyaml-devel libffi-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel
Step 3: Install RVM ( Ruby Version Manager )
@dajare
dajare / maketext.js
Created April 12, 2013 13:20
Make.text bookarklet: place JS code between quotes in <a href="">make.text</a> to create the bookmarklet; converts webpage to markdown.
javascript:(function(){/**%20Make.text%201.5.%20Trevor%20Jim.%20License:%20GPL%20v2%20(www.fsf.org/copyleft/gpl.html).%20**/%20var%20logging%20=%20false;%20var%20logString%20=%20'';%20var%20unhandled%20=%20{};%20%20function%20log(exn,msg)%20{%20if%20(!logging)%20return;%20logString%20+=%20msg%20+%20':%20'%20+%20exn%20+%20'%5cn';%20}%20var%20w%20=%20window.open('');%20%20var%20d%20=%20w.document;%20var%20last%20=%20null;%20function%20addText(s)%20{%20if%20(last%20!=%20null)%20d.write(last);%20last%20=%20s;%20}%20function%20llapLast(s)%20{%20if%20(last)%20last%20=%20last.replace(/%20%20%20%20$/,s);%20}%20function%20finishOutput()%20{%20addText(%22%22);%20}%20var%20links%20=%20new%20Array(window.location);%20%20var%20rlinks%20=%20{};%20rlinks[window.location]%20=%200;%20var%20linkTitles%20=%20new%20Array();%20var%20atP%20=%20true;%20var%20atLeft%20=%20true;%20var%20atNoWS%20=%20true;%20%20var%20left%20=%20'%5cn';%20function%20pushLeft(s)%20{%20var%20oldLeft%20=%20left;%20left%20+=%20s;%20if%20(atP)%20addText(s);
@emmanuelbarturen
emmanuelbarturen / testing mail in droplet with laravel
Created November 3, 2017 23:12
send email from artisan with tinker of laravel
# SSH into droplet
# go to project
$ php artisan tinker
$ Mail::send('errors.401', [], function ($message) { $message->to('emmanuelbarturen@gmail.com')->subject('this works!'); });
# check your mailbox