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
@ECHO OFF | |
REM Simple wrapper for PHP PHAR files for Windows command line | |
REM Executes a phar file in a with the same name as this script in a subfolder named phars | |
REM Eg. Calling this script c:\tools\runphar.bat will execute "php c:\tools\phars\runphar.phar" | |
SET BASE_DIR=%~dp0 | |
SET SCRIPT_NAME=%~n0 | |
SET PHAR=%BASE_DIR%phars\%SCRIPT_NAME%.phar | |
SET PHP=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
function findPHP() { | |
if (defined('PHP_BINARY') && is_executable(PHP_BINARY)) { | |
$res = PHP_BINARY; | |
} else { | |
$which = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'where' : 'which'; | |
$outputArr = []; | |
$whichReturn = false; | |
$res = exec($which . " php 2>&1", $outputArr, $whichReturn); | |
if ($whichReturn !== 0) { | |
$res = false; |
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 | |
ini_set('display_errors', 'On'); | |
$siteArchive = $_SERVER['DOCUMENT_ROOT'] . "/site.tar.gz"; | |
$dbDump = $_SERVER['DOCUMENT_ROOT'] . "/dump.sql"; | |
$outputeArchive = array(); | |
$return_varArchive = 99; | |
$outputDump = array(); | |
$return_varDump = 99; | |
error_reporting(E_ALL); |
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
export $DISPLAY=:0; | |
gsettings get org.gnome.desktop.screensaver lock-delay; | |
gsettings get org.gnome.desktop.session idle-delay; | |
dbus-launch gsettings set org.gnome.desktop.screensaver lock-delay 0; | |
dbus-launch gsettings set org.gnome.desktop.session idle-delay 0; | |
git clone https://github.com/lavi741/gnome-shell-extension-inhibit-suspend /tmp/inhibit-suspend; | |
mv /tmp/inhibit-suspend/[email protected] ~/.local/share/gnome-shell/extensions/test | |
dbus-launch gsettings set org.gnome.shell enabled-extensions "['[email protected]']"; |
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 | |
namespace App\Http\Controllers; | |
class WelcomeController extends Controller { | |
/* | |
|-------------------------------------------------------------------------- | |
| Welcome Controller | |
|-------------------------------------------------------------------------- | |
| |
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
div{ | |
@media (min-width: $screen-xs) { // Mobile portrait < 480px | |
border: 1px solid yellow; | |
} | |
@media (min-width: $screen-sm-min) { // Mobile landscape / Tablet portrait < 768px | |
border: 1px solid green; | |
} | |
@media (min-width: $screen-md-min) { // Tablet landscape < 992px |
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/bash | |
#shows traffic on the specified device | |
function human_readable { | |
VALUE=$1 | |
BIGGIFIERS=( B K M G ) | |
CURRENT_BIGGIFIER=0 | |
while [ $VALUE -gt 10000 ] ;do | |
VALUE=$(($VALUE/1000)) |
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/bash | |
#shows speed on the specified device | |
###CHECKS#### | |
DEVICE=$1 | |
IS_GOOD=0 | |
for GOOD_DEVICE in `grep ":" /proc/net/dev | awk '{print $1}' | sed s/:.*//`; do |
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
@ECHO OFF | |
SET RUBY="c:\tools\ruby200\bin\ruby.exe" | |
SET NODE=C:\ProgramData\chocolatey\bin\node.exe | |
SET RUBY_SASS="c:/tools/ruby200/bin/sass" | |
SET NODE_SASS=node_modules\node-sass\bin\node-sass | |
SET WT_SASS=wt.exe | |
SET ARG1=%1 | |
SET ARG2=%2 | |
SET ARG3=%3 | |
SET ARG4=%4 |
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
apt-get install woff-tools | |
apt-get install fontforge | |
cd /usr/local/src/ | |
git clone --recursive https://github.com/google/woff2.git | |
cd woff2 | |
make clean all | |
ln -s /usr/local/src/woff2/woff2_* /usr/local/bin/ | |
cd.. | |
git clone https://github.com/zoltan-dulac/css3FontConverter.git |
OlderNewer