Skip to content

Instantly share code, notes, and snippets.

View filpgame's full-sized avatar

Felipe Rodrigues filpgame

View GitHub Profile
@avafloww
avafloww / PhpJava.java
Last active October 16, 2022 18:50
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
var gulp = require('gulp'),
compile = require('./node_modules/laravel-elixir/tasks/shared/Css.js'),
Elixir = require('laravel-elixir'),
Log = Elixir.Log,
fs = require('fs'),
path = require('path'),
config = Elixir.config;
/*
|----------------------------------------------------------------
@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
@stayallive
stayallive / install.sh
Last active September 20, 2022 17:24
Install PHP 5.5.23 on Plesk 11.5 and 12 (CentOS 6)
#!/bin/bash
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Get us a clean working directory
mkdir /php
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@Celleb
Celleb / aajquery.validate.additional-methods.js
Last active March 16, 2018 15:39
Additional methods for jquery.validate.js plugin. Adds functionality to match to input elements ie. Password and confirm password. Look up functionality - to lookup if the entered info is in the database i.e codes etc. Duplicates - to lookup for duplicates in the database. You need the jquery validation plugin from http://jqueryvalidation.org/
(function() {
/* This method is to match two input elements */
jQuery.validator.addMethod("match", function(value, element, options) {
if (value === $(options).val()) {
return true;
} else {
return false;
}
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@Zoxc
Zoxc / ggpk_defragment.rb
Last active January 4, 2024 02:50
GGPK Defragmenter
require 'bindata'
require 'benchmark'
require 'win32/registry'
require 'io/console'
class GGPK
class UTF16String < BinData::String
def snapshot
super.force_encoding('UTF-16LE')
end