Skip to content

Instantly share code, notes, and snippets.

View kamilsj's full-sized avatar
😎
Working hard to develop https://mountaingrip.com

Kamil Boberek kamilsj

😎
Working hard to develop https://mountaingrip.com
View GitHub Profile
@kamilsj
kamilsj / matury.py
Last active September 5, 2018 21:41
Matura z informatyki 2016 - rozwiązania
#!/usr/bin/env python
import os
def zad1_1(a, b):
sumaa = 0
sumab = 0
i = 1
@kamilsj
kamilsj / func.php
Last active May 18, 2016 07:38
PHP embeding Youtube and Vimeo clips from url
<?php
function url($string, $width = 550, $height = 309)
{
if(isset($string)){
if(preg_match_all('/(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,6}(\/\S*)+?/', $string, $matches)){
foreach($matches as $value){
foreach($value as $key) {
@m1st0
m1st0 / php_build_ubuntu.sh
Last active November 25, 2023 07:33
Compiling PHP 8 on Ubuntu 22.10 with Various Supported Modules
#!/bin/bash
# PHP 8 Compile #
# Author: Maulik Mistry
# Please share support: https://www.paypal.com/paypalme/m1st0
# References:
# http://www.zimuel.it/install-php-7/
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
# root-talis https://gist.github.com/root-talis/40c4936bf0287237839ccd3fdfdaec28
#
@tronsha
tronsha / installphp7.sh
Last active October 13, 2023 00:13
Install PHP7 to Ubuntu
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
apt-get update
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev make
mkdir -p /etc/php7/conf.d
mkdir -p /etc/php7/cli/conf.d
mkdir /usr/local/php7
@kamilsj
kamilsj / Dest-Serv
Created March 7, 2015 17:47
Changing Ubuntu Desktop into Ubuntu Server
sudo apt-get install tasksel
sudo tasksel remove ubuntu-desktop
sudo tasksel install server
sudo apt-get update
sudo apt-get install linux-server linux-image-server
sudo apt-get purge lightdm
@philfreo
philfreo / gist:7257723
Created October 31, 2013 21:44
Facebook Perl source code from 2005. When browsing around thefacebook.com in 2005 the server spit out some server-side source code rather than running it. I believe this was for their old graph feature that let you visualize the graph between all your friends. The filename is `mygraph.svgz` and contains some gems such as a commented out "zuck" d…
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
@jhass
jhass / diaspora.conf
Last active March 12, 2021 13:18
Advanced Diaspora Apache reverse proxy
# Make sure to notice the comments at https://gist.github.com/jhass/719014#gistcomment-19774
<VirtualHost *:80>
ServerName diaspora.example.org
ServerAlias www.diaspora.example.org
RedirectPermanent / https://diaspora.example.org/
</VirtualHost>
<VirtualHost *:443>
ServerName diaspora.example.org