Skip to content

Instantly share code, notes, and snippets.

View kapitanluffy's full-sized avatar
🏠
Working from home

kapitanluffy

🏠
Working from home
View GitHub Profile
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@kapitanluffy
kapitanluffy / ubuntu_deploy.sh
Last active December 17, 2015 06:19
simple script for prepping an ubuntu development server
#!/bin/bash
# update and upgrade packages
apt-get -y update
apt-get -y upgrade
# install openssh server for remote administration
apt-get -y install openssh-server
# install misc #1

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for live environment!

I hope it's a help also for you!

#Installation stack

Install git:

sudo apt-get install git

Configure Git:

touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"

git config --global user.email "Your Email"

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

#!/bin/bash
clear
clear
echo '#'
echo '# CentOS 6.3 LAMP Server Provisioning Script'
echo '#'
echo '# This script will guide you through the initial server provisioning for a standard CentOS 6.3 LAMP server.'
echo '#'
echo '# [x] iptables lockdown'
echo '# [x] Change root password'
@kapitanluffy
kapitanluffy / stickyman.bat
Created August 3, 2017 06:35
stickyman - backup & restore sticky notes
@echo off
SETLOCAL enableDelayedExpansion
where /q makecab
if %errorlevel% neq 0 (
set combkp=copy /Y
set comrtr=copy /Y
) else (
rem set combkp=certutil -f -encode
rem set comrtr=certutil -f -decode

Keybase proof

I hereby claim:

  • I am kapitanluffy on github.
  • I am kapitanluffy (https://keybase.io/kapitanluffy) on keybase.
  • I have a public key whose fingerprint is 2007 049B BAA0 A62D 8FCA 9E34 EAB2 41A6 A734 438F

To claim this, I am signing this object:

@kapitanluffy
kapitanluffy / StringList.php
Created May 7, 2018 10:06
StringList for PHP
<?php
class StringList extends \ArrayObject
{
protected $data = [];
public function __construct($data, $delimiter = " ")
{
self::checkNonScalarValues($data);
@kapitanluffy
kapitanluffy / SetTransparency.bat
Created December 7, 2018 03:34
Portable batch file for creating SetTransparency.exe in Sublime Text directory
@echo off
SETLOCAL EnableDelayedExpansion
:: Run to automatically place SetTransparency.exe in ST3 installation folder instead of downloading it from repo
:: Original exe found @ https://github.com/ivellioscolin/settransparency
:: Related issue @ https://github.com/ivellioscolin/sublime-plugin-glassit/issues/4
:: Settings
set stpath=%ProgramFiles%\Sublime Text 3
set exefile=SetTransparency.exe