Skip to content

Instantly share code, notes, and snippets.

View mixaz's full-sized avatar

Mikhail Zemlyanukha mixaz

  • freelancer
  • Russia
View GitHub Profile
@bmchild
bmchild / applicationContext.xml
Created November 16, 2011 21:19
maven-war-plugin using environments
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
@zenideas
zenideas / existing code to git repo
Created October 1, 2012 09:52
Adding existing source to remote git repo
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source)
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git
2. If your local GIT repo is already set up, skips steps 2 and 3
3. Locally, at the root directory of your source, git init
4. Locally, add and commit what you want in your initial repo (for everything,
git add .
@senthil245
senthil245 / JDK 1.6 Installation in Ubuntu
Created July 27, 2013 02:16
Step by step installation of JDK 1.6 in Ubuntu
Install Java JDK 6.0 update 31 on Ubuntu 12.04 LTS
Introduction
The first question is why are we installing an old JDK. The answer is that Oracle JDK 6.0 update 31 is the JDK recommended by Cloudera when installing CDH4 (Cloudera Distribution Hadoop v4).
This is an update to an older version of this post. Mainly I have changed the JDK from 1.6.0_26 to 1.6.0_31 as this is the recommended JDK for CDH4 .
Install Java
I have a 64 bit version of Ubuntu 12.04 LTS installed, so the instructions below only apply to this OS.
@wbroek
wbroek / genymotionwithplay.txt
Last active February 13, 2025 09:37
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@oakwhiz
oakwhiz / configure-crond-journal.md
Last active November 9, 2023 06:47
How to configure crond to send cron job output to the system journal

How to configure crond to send cron job output to the system journal

Keywords: fedora 20, systemd, cron, crond, output, stdout, journal

Problem: You want to capture and read the output of your cron jobs, but the output isn't being logged anywhere.

Solution: Add an argument to crond.

@pgilad
pgilad / Instructions.md
Last active March 31, 2024 22:30
Git commit-msg hook to validate for jira issue or the word merge

Instructions

  • copy the file commit-msg to .git/hooks/commit-msg
  • make sure your delete the sample file .git/hooks/commit-msg.sample
  • Make commit msg executable. chmod +x .git/hooks/commit-msg
  • Edit commit-msg to better fit your development branch, commit regex and error message
  • Profit $$

Shell example

@renatolfc
renatolfc / android-client.ovpn
Created December 28, 2014 18:59
A sample OpenVPN client configuration file in the unified format
client
dev tun
remote example.com
resolv-retry infinite
nobind
persist-key
persist-tun
ca [inline]
cert [inline]
key [inline]
@igorepst
igorepst / gist:091a9c16d08c1981b3ac
Last active June 12, 2021 02:48
Gradle: Copy Proguard's mapping.txt to save it
android {
applicationVariants.all { variant ->
if (variant.getBuildType().isMinifyEnabled()) {
variant.assemble.doLast{
copy {
from variant.mappingFile
into "${rootDir}/mappings"
rename { String fileName ->
"mapping-${variant.name}.txt"
}
@zankich
zankich / bbb_connect.sh
Last active April 1, 2019 10:56
connect to your beaglebone black using the usb->ethernet and forward the internet from your host computer to the beaglebone black
#!/bin/bash
#
# run this script on your linux host computer to connect to the bbb and forward your internet.
# be sure to replace "enp0s20u1" with the appropriate usb device for your bbb, which can be found
# by doing an "ifconfig" on your host computer.
#
sudo -- sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
@z3ntu
z3ntu / local_manifest.xml
Last active October 10, 2016 19:27
Ubuntu Touch Fairphone 2
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="fairphone" fetch="http://code.fairphone.com/gerrit/fp2-dev" />
<project path="device/fairphone_devices/FP2" name="device/fairphone_devices/fairphone" remote="fairphone" revision="fp2-sibon" />
<project path="kernel" name="kernel/msm" remote="fairphone" revision="fp2-sibon" />
<project path="device/qcom/common" name="device/qcom/common" remote="fairphone" revision="fp2-sibon" />
<project path="bootable/bootloader/lk" name="kernel/lk" remote="fairphone" revision="fp2-sibon" />
</manifest>