Skip to content

Instantly share code, notes, and snippets.

@viitechsolutions
viitechsolutions / install-xdebug.sh
Created April 29, 2020 18:36
Install xdebug on Mac or Linux
curl https://xdebug.org/files/xdebug-2.9.5.tgz --output xdebug-2.9.5.tgz
tar -xzf xdebug-2.9.5.tgz
cd xdebug-2.9.5
phpize
./configure --enable-xdebug
make
make install
@mikepfeiffer
mikepfeiffer / stress.sh
Created January 27, 2019 21:05
Install Stress Utility on Amazon Linux 2
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
@dcnl1980
dcnl1980 / nginx-cookieless.conf
Last active September 17, 2021 02:48
Nginx Cookieless Domain
#
# Name: nginx-cookieless.conf
# Auth: Chris van Steenbergen <cvsteenbergen@gmail.com>
# Date: 12 August 2016
# Desc: Nginx Cookieless Domain configuration for 100% performance grade with
#
# See for yourself at: https://tools.pingdom.com/#!/beJG0v/http://www.reclick.nl
#
server {
@leowebguy
leowebguy / index.html
Last active April 10, 2024 01:21
Responsive iframe full screen. Display page without and hide original url address.
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style>
html body {width: 100%;height: 100%;padding: 0px;margin: 0px;overflow: hidden;font-family: arial;font-size: 10px;color: #6e6e6e;background-color: #000;} #preview-frame {width: 100%;background-color: #fff;}</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
//function to fix height of iframe!
var calcHeight = function() {
@Nav-Appaiya
Nav-Appaiya / reset-phpstorm.sh
Last active October 1, 2023 12:07
Purge PHPStorm 9.x Settings on OSX Yosemite
# PHPStorm v9.0
rm -rf ~/Library/Application\ Support/WebIde90
rm -rf ~/Library/Cache/WebIde90
rm -rf ~/Library/Preferences/WebIde90
# PHPStorm v10.0
rm -rf ~/Library/Application\ Support/WebIde100
rm -rf ~/Library/Cache/WebIde100
rm -rf ~/Library/Preferences/WebIde100
@tomzx
tomzx / gist:aa2d9172a1daef15a0ac
Created January 7, 2015 02:41
./gradlew: Permission denied
/home/travis/build.sh: line 175: ./gradlew: Permission denied
Fix by setting the executable flag on your gradlew file.
Either
chmod +x gradlew (on unix systems)
OR
@bucker
bucker / bash_shortcut.md
Last active May 16, 2021 17:31
Bash shortcuts for Mac

To Use the option (⌥) key, set it as meta key

Moving the cursor

  • ⌃a: Go to the beginning of the line
  • ⌃e: Go to the end of the line
  • ⌃p: Previous command (Up arrow)
  • ⌃n: Next command (Down arrow)
  • ⌃f: Forward one character
  • ⌃b: Backward one character
  • ⌃xx: Toggle between the start of line and current cursor position
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@togramago
togramago / ExtendedNumberPicker.java
Last active May 8, 2019 07:35
NumberPicker with transparent selection dividers via Reflection
package com.runup.myapplication2.app;
import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.widget.NumberPicker;
import java.lang.reflect.Field;
/**
@tamoyal
tamoyal / gist:10441108
Created April 11, 2014 04:39
Create super user and database user in Mongo 2.6
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile