Skip to content

Instantly share code, notes, and snippets.

⚔️
Struggling

Jorge Hernández lesthack

⚔️
Struggling
Block or report user

Report or block lesthack

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
@lesthack
lesthack / battery.py
Created Sep 23, 2019 — forked from wangqr/battery.py
Python script to get battery status on Windows
View battery.py
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import ctypes
from ctypes import wintypes
class SYSTEM_POWER_STATUS(ctypes.Structure):
_fields_ = [
('ACLineStatus', wintypes.BYTE),
('BatteryFlag', wintypes.BYTE),
View wakatime2sqlite.py
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
from argparse import ArgumentParser
import sqlite3
import json
import os
import sys
filename = None
sqlitefile = None
View autowallpaper.sh
#/bin/bash
# Paths
home_path="/home/user"
wallpapers_path="$home_path/Wallpapers"
# Test Internet Connection
wget -q --spider http://google.com
if [ $? -eq 0 ]; then
View extract-wp-posts.py
from BeautifulSoup import BeautifulSoup as bs
import sqlite3
import os
import sys
import json
reload(sys)
sys.setdefaultencoding('utf-8')
base = os.path.dirname(os.path.realpath(__file__))
View Mr. Robot s03e03.srt
1
00: 00: 00,048 -> 00: 00: 02,461
Tyrell Wellick. Va a ser
se divertido trabajando contigo.
2
00: 00: 02,464 -> 00: 00: 04,426
Creo que eres hermosa.
Quiero llevarte a casa.
View gist:824a77fb527a3408738b79f9b23b1b9e
10-05 12:13:31.748 19739-19739/mx.dev.franco.musicallibraryorganizer E/ExtMediaPlayer-JNI: QCMediaPlayer could not be located....
10-05 12:13:31.748 19739-19739/mx.dev.franco.musicallibraryorganizer E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
10-05 12:13:31.751 19739-19739/mx.dev.franco.musicallibraryorganizer E/AndroidRuntime: FATAL EXCEPTION: main
Process: mx.dev.franco.musicallibraryorganizer, PID: 19739
java.lang.NoSuchMethodError: No virtual method getColor(ILandroid/content/res/Resources$Theme;)I in class Landroid/content/res/Resources; or its super classes (declaration of 'android.content.res.Resources' appears in /system/framework/framework.jar)
at mx.dev.franco.musicallibraryorganizer.SelectFolderActivity.onCreate(SelectFolderA
View test.json
This file has been truncated, but you can view the full file.
{"topalbums":[
{
"album": "Amor , pasi\u00f3n y otras locuras",
"artist": "Avenue",
View make-me-a-sandwich.sh
#!/bin/bash
# By: lesthack
if [[ $EUID -ne 0 ]]; then
echo "What? Make it yourself."
echo '
_____
|_ _|
n (O O) n
H _|\_/|_ H
View fnHorasReales.sql
DROP FUNCTION IF EXISTS fnHorasReales;
CREATE FUNCTION fnHorasReales(in_tarea_id INT) RETURNS FLOAT
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE sts INT;
DECLARE last_sts INT;
DECLARE fecha datetime;
DECLARE fecha_ini datetime;
DECLARE fecha_fin datetime;
You can’t perform that action at this time.