This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jeremie Miserez <[email protected]>, 2015 | |
// | |
// A little bit of Javascript to let you export your Google Music library, playlists, and album track lists :) | |
// | |
// I posted this as an answer here: http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music | |
// | |
// 1. Go to: https://play.google.com/music/listen#/all (or your playlist) | |
// | |
// 2. Open a developer console (F12 for Chrome). Paste | |
// code below into the console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
font_family="FiraCode-Regular.ttf" | |
image="logo.jpg" | |
getMetaTitle (){ | |
tmp=$( ffprobe "$1" 2>&1 | grep title) | |
echo ${tmp##*:} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding:utf-8 -*- | |
from argparse import ArgumentParser | |
import sqlite3 | |
import json | |
import os | |
import sys | |
filename = None | |
sqlitefile = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# By: lesthack | |
if [[ $EUID -ne 0 ]]; then | |
echo "What? Make it yourself." | |
echo ' | |
_____ | |
|_ _| | |
n (O O) n | |
H _|\_/|_ H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#List vms | |
VBoxManage list vms | |
#get status of time sync | |
VBoxManage getextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled | |
#NOTE: Make sure to restart the VM after changing these settings. | |
#disable time sync | |
VBoxManage setextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
# game loop | |
while True: | |
mountains = [] | |
for i in xrange(8): | |
mountain_h = int(raw_input()) # represents the height of one mountain. | |
mountains.append(mountain_h) | |
print mountains.index(max(mountains)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "./manage.py", line 10, in <module> | |
execute_from_command_line(sys.argv) | |
File "/Users/lesthack/.virtualenvs/pymxweb/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line | |
utility.execute() | |
File "/Users/lesthack/.virtualenvs/pymxweb/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute | |
django.setup() | |
File "/Users/lesthack/.virtualenvs/pymxweb/lib/python3.4/site-packages/django/__init__.py", line 21, in setup | |
apps.populate(settings.INSTALLED_APPS) | |
File "/Users/lesthack/.virtualenvs/pymxweb/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate |
NewerOlder