Skip to content

Instantly share code, notes, and snippets.

View webarthur's full-sized avatar
✌️

Arthur Ronconi webarthur

✌️
View GitHub Profile
# add user webarthur
adduser webarthur
# add git group
addgroup git
# add user to group
usermod -a -G git webarthur
@tsbarnes
tsbarnes / monokai-dark.theme
Created August 12, 2015 04:53
Monokai color scheme for XFCE4 terminal, place it in /usr/share/xfce4/terminal/colorschemes
[Scheme]
Name=Monokai (dark)
TabActivityColor=#a6a6e2e22e2e
ColorCursor=#f8f8f8f8f2f2
ColorForeground=#f8f8f8f8f2f2
ColorBackground=#272728282222
ColorPalette=#272728282222;#f9f926267272;#a6a6e2e22e2e;#f4f4bfbf7575;#6666d9d9efef;#aeae8181ffff;#a1a1efefe4e4;#f8f8f8f8f2f2;#757571715e5e;#f9f926267272;#a6a6e2e22e2e;#f4f4bfbf7575;#6666d9d9efef;#aeae8181ffff;#a1a1efefe4e4;#f9f9f8f8f5f5
@ilyaigpetrov
ilyaigpetrov / pure-css-bootstrap-modal.html
Last active August 11, 2023 12:43
Pure CSS Bootstap Modal, requires only bootstap.css, no JavaScript.
<label for="modal-switch" class="btn btn-default btn-primary" role="button" data-toggle="modal" data-target="#myModal">Launch demo modal</label>
<!-- Modal -->
<div class="pure-css-bootstrap-modal">
<style>
.pure-css-bootstrap-modal {
position: absolute; /* Don't take any space. */
}
.pure-css-bootstrap-modal label.close {
/* Reset */
padding: 0;
@taufik-nurrohman
taufik-nurrohman / php-html-css-js-minifier.php
Last active October 12, 2024 17:10
PHP Function to Minify HTML, CSS and JavaScript
<?php
// Based on <https://github.com/mecha-cms/x.minify>
namespace x\minify\_ { // start namespace
$n = __NAMESPACE__;
\define($n . "\\token_boolean", '\b(?:true|false)\b');
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+');
@ludo237
ludo237 / .htaccess
Last active July 5, 2024 14:55
The ultimate .htaccess file. Please feel free to fork it, edit it and let me know what do you think about it.
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
@ngfw
ngfw / gist:4684951
Created January 31, 2013 18:15
PHP Base62 Class
<?php
/**
* Base62: A class to convert a number from any base between 2-62 to any other base between 2-62
* It doesn't use BC Math functions so works without the use of BC Math library.
* It uses the native base_convert functions when the base is below 36 for faster execution.
* The output number is backward compatible with the native base_convert function.
*
* Author : Lalit Patel
* Website: http://www.lalit.org/lab/base62-php-convert-number-to-base-62-for-short-urls
* License: Apache License 2.0
@jimkutter
jimkutter / gist:1370525
Created November 16, 2011 16:21
List of US States in a PHP array
<?php
array(
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
@hubgit
hubgit / mongodb-aggregation.php
Created September 27, 2010 11:38
GROUP BY in MongoDB
<?php
$mongo = new Mongo('mongodb://localhost', array('persist' => true));
$collection = $mongo->selectDB('test')->selectCollection('group');
$collection->drop();
foreach (range(1,1000) as $i){
$name = ($i % 3 === 0) ? 'Fred' : 'Bob';
$collection->insert(array('id' => $i, 'name' => $name));
}