Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
🐦

Dan Ξ AndreiD

🦄
🐦
  • in front of a screen
View GitHub Profile
@AndreiD
AndreiD / From python script to exe to setup
Last active Aug 29, 2015
From python script to exe to setup.
View From python script to exe to setup
1. Write your python script
Check -> wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily.
Helper for wxPython http://sourceforge.net/projects/wxformbuilder/ (a must for beginners)
2. type the following command cd c:\python27\scripts press enter, this should be where your pip.exe file is located.
Once you are in this directory type pip install pyinstaller press enter
google pywin32, install the 32/64 bit variant.
@AndreiD
AndreiD / python_pdf_to_text_or_html
Created Aug 14, 2014
Python PDF to Text or HTML HOW TO:
View python_pdf_to_text_or_html
pip install pdfminer
for text replace HTMLConverter to TEXTConverter....
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from pdfminer.converter import HTMLConverter
from cgi import escape
@AndreiD
AndreiD / colors.xml
Created Nov 8, 2014
Android Colors list in xml. Holo included
View colors.xml
<resources>
<!-- A light Holo shade of blue -->
<color name="holo_blue_light">#ff33b5e5</color>
<!-- A light Holo shade of gray -->
<color name="holo_gray_light">#33999999</color>
<!-- A light Holo shade of green -->
<color name="holo_green_light">#ff99cc00</color>
<!-- A light Holo shade of red -->
@AndreiD
AndreiD / cool_things_to_add
Last active Aug 29, 2015
Cool things to add.
View cool_things_to_add
compile('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
https://github.com/mikepenz/Android-Iconics
=====================
View install_ffmpeg_ubuntu.sh
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@AndreiD
AndreiD / main.py
Last active Nov 18, 2015
facebook best friend v.01
View main.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import pickle
import time
driver = webdriver.Firefox()
def init():
print "------- initialization -------------"
View xhello_version_1
HotKeySet("{ESC}", "Terminate")
Opt("SendKeyDelay", 50)
ToolTip("XHello Running", screen_height/2, screen_width/2, "XHello", 1) ; ex: 2560 1440 or 1920 1080 etc.
SplashTextOn("", "XHello", -1, -1, -1, -1, 33, "", 24)
Sleep(3000)
SplashOff()
Global $MESSAGES[4] = ["whatzup ?", "g morning", "Knock!!!Knock!!!", "8-)"] ; your messages
@AndreiD
AndreiD / test sockets
Created Apr 8, 2016
test android sockets
View test sockets
package com.androidadvance.testsockets;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import com.neovisionaries.ws.client.OpeningHandshakeException;
View firebase_to_elastic_search_helper
1. install java
2. sudo apt-get install npm
3. Download latest ES https://www.elastic.co/downloads/elasticsearch
wget <PASTE_LINK>
4. sudo dpkg -i elasticsearch-<version>.deb
5. (optional) sudo update-rc.d elasticsearch defaults
Configure it
The Elasticsearch configuration files are in the /etc/elasticsearch
@AndreiD
AndreiD / color_schemes_android
Last active Sep 1, 2016
Color Schemes Android Material Design
View color_schemes_android
#1. Unobtrusive Android Cafe
<color name="colorPrimaryDark">#403835</color>
<color name="colorPrimary">#8A7A6B</color>
<color name="colorAccent">#403835</color>
<color name="windowBackground">#F7F3EE</color>
<color name="colorControlNormal">#A79D93</color>
<color name="colorControlActivated">#8A7A6B</color>
<color name="navbar_color">@color/colorPrimaryDark</color>
<item name="colorPrimary">@color/colorPrimary</item>