Skip to content

Instantly share code, notes, and snippets.

View Galarzaa90's full-sized avatar

Allan Galarza Galarzaa90

View GitHub Profile
{
"basics": {
"name": "Allan Galarza",
"label": "Developer",
"summary": "I am a mechatronics engineer with a love for electronics, automation and software development. I really enjoy learning and organization.",
"website": "https://galarzaa90.github.io/",
"email": "[email protected]",
"location": {
"city": "Hermosillo",
"region": "Sonora",
@Galarzaa90
Galarzaa90 / screenflip.sh
Last active February 22, 2017 17:12
Script to rotate the touch screen driver on Raspberry Pi official touchscreen.
#!/bin/bash
#script to set correct touchscreen orientation after x start
#this won't rotate the displayed image, only the touchscreen input
#to rotate the displayed image add the following to /boot/config.txt
#"display_rotate=1" to rotate display 90 degrees
#"display_rotate=3" to rotate display 270 degrees
# To execute this script on boot, add the following line:
#@/path/to/file/screenflip.sh
#to (Wheezy):
@Galarzaa90
Galarzaa90 / showForegroundNotification.java
Last active March 2, 2023 13:12 — forked from kristopherjohnson/showForegroundNotification.java
Shows a foreground notification for an Android service. Tapping the notification will display the app as if it was tapped in application launcher
//In a service
public void showNotification(){
Intent notificationIntent = new Intent(getApplicationContext(),MainActivity.class);
notificationIntent.setAction(Intent.ACTION_MAIN);
notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent contentIntent = PendingIntent.getActivity(
getApplicationContext(),
0,