This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get update | |
echo "\e[96mInstalling git \e[39m" | |
apt-get install -y git | |
echo "\e[96mInstalling php \e[39m" | |
apt-get install -y php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | sudo tee /etc/apt/sources.list.d/resilio-sync.list | |
sudo wget -qO - https://linux-packages.resilio.com/resilio-sync/key.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo dpkg --add-architecture armel | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
// Generage HTML page here | |
generate_full_html_page(); | |
// All magic goes here | |
$output = ob_get_clean(); | |
ignore_user_abort(true); | |
set_time_limit(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = "AAAB4Q=="; | |
$raw = base64_decode($data); | |
print_r(unpack('Nint',$raw)); | |
echo "<br/>"; | |
$data = "AQ=="; | |
$raw = base64_decode($data); | |
print_r(unpack('Cbool',$raw)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// helper function for utf-8 | |
function file_get_contents_utf8($fn) { | |
$content = file_get_contents($fn); | |
return mb_convert_encoding($content, 'UTF-8', | |
mb_detect_encoding($content, 'UTF-8, ISO-8859-1', true)); | |
} | |
// open corrupted text file | |
$string = file_get_contents_utf8("input_file.sql"); |