Skip to content

Instantly share code, notes, and snippets.

Uilian Souza uilian

Block or report user

Report or block uilian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hidroh
hidroh / avd.sh
Last active Jun 29, 2019
Handy bash script to prompt for an Android virtual device (AVD) selection and launch it. Assuming that Android SDK has been set up and is in user PATH.
View avd.sh
emulator -list-avds | cat -n
printf "Select AVD: "
read index
avd=$(emulator -list-avds | sed "${index}q;d")
echo "Selected $avd"
emulator -netdelay none -netspeed full -avd $avd
View gist:0af4324d0ec7b6a0fa01

@Pramati - HYD (16/07/2015)

  1. What is your role and responsibilities in your current project?
  2. Find common elements from two arrays? Without using any Ruby operator and tell me how would you write a program?
  3. How to find an element from an array? How it internally works?
  4. How to sort ruby objects based on particular object? For ex: [@user1, @user2, @user3, @user4] - Then sort it by user's salary.
  5. Explain MVC?
  6. What is the use of moving controller code to model?
  7. Tell me the internal flow of execution when I call some method? For ex: @object.some_method
@jzfgo
jzfgo / xvfb.service
Created Jul 8, 2015
Manage Xvfb (Virtual Framebuffer X Server) as a service for systemd based distros (CentOS 7, Ubuntu 15...)
View xvfb.service
[Unit]
Description=Virtual Frame Buffer X Server
After=network.target
[Service]
ExecStart=/usr/bin/Xvfb :42 -screen 0 1x1x24 -ac +extension GLX +render -noreset
[Install]
WantedBy=multi-user.target
@matthewtckr
matthewtckr / Pentaho_BA_Dockerfile
Last active Aug 29, 2015
Dockerfile to install Pentaho 5.1 from Archive Build with Plugins
View Pentaho_BA_Dockerfile
############################################################
# Dockerfile to build Pentaho EE BA Server container images
# Based on Ubuntu 14.04
############################################################
FROM ubuntu:14.04
MAINTAINER Matt Tucker, matthewtckr@gmail.com
## Install Base Software
RUN apt-get update -y
@uilian
uilian / long-queries-progress.sql
Last active Aug 29, 2015
Oracle - Long query progress
View long-queries-progress.sql
--
-- Mostra o andamento de operacoes longas no Oracle.
--
select target, sofar, totalwork, ROUND((sofar/totalwork)*100,5) pct_done
from v$session_longops
where (sid, serial#) in (select sid, serial#
from v$session
where logon_time > trunc(sysdate))
order by pct_done;
@timyates
timyates / excel.groovy
Last active Jun 13, 2017
Create a styled Excel spreadsheet with Groovy and Apache POI
View excel.groovy
@Grab( 'org.apache.poi:poi:3.9' )
import static org.apache.poi.ss.usermodel.CellStyle.*
import static org.apache.poi.ss.usermodel.IndexedColors.*
import org.apache.poi.hssf.usermodel.HSSFWorkbook
new HSSFWorkbook().with { workbook ->
def styles = [ LIGHT_BLUE, LIGHT_GREEN, LIGHT_ORANGE ].collect { color ->
createCellStyle().with { style ->
fillForegroundColor = color.index
fillPattern = SOLID_FOREGROUND
@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
View text-based graph
git log --graph --pretty=oneline --abbrev-commit
You can’t perform that action at this time.