Skip to content

Instantly share code, notes, and snippets.

View melwinm's full-sized avatar

Melwin melwinm

View GitHub Profile
@melwinm
melwinm / backup.bat
Created January 11, 2013 19:32
Very simple backup batch script based on xcopy. xcopy /D parameter makes it fast because only new files will copied.
REM replace a, b, c, ... with your source paths
set sourceFileList=(^
a ^
b ^
c ^
)
REM replace t with your target directory
set targetDir=t
for %%i in %sourceFileList% do ( XCOPY %%i %targetDir% /D /E /C /Y /L )
pause
@melwinm
melwinm / gist:4608450
Created January 23, 2013 15:49
execution order
include_recipe "apt"
# remove default repository
if ::File.exists?("/etc/apt/sources.list")
Chef::Log.info "Removing /etc/apt/sources.list"
file "/etc/apt/sources.list" do
action :delete
end
end
@melwinm
melwinm / gist:4632986
Created January 25, 2013 09:12
erstes apt-get update
vagrant@vagrant-debian-squeeze-64:~$ sudo apt-get update
Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Get:2 http://ftp.ch.debian.org squeeze Release.gpg [6,002 B]
Err http://ftp.ch.debian.org/debian/ squeeze/contrib Translation-en
Bad header line
Err http://ftp.ch.debian.org/debian/ squeeze/contrib Translation-en_US
Bad header line
Err http://ftp.ch.debian.org/debian/ squeeze/main Translation-en
Bad header line
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
login as: vagrant
vagrant@127.0.0.1's password:
Linux vagrant-debian-squeeze-64 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 20 12 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
vagrant@vagrant-debian-squeeze-64:~$ sudo apt-get upgrade install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
acpid base-files bind9-host debian-archive-keyring dnsutils dpkg dpkg-dev exim4 exim4-base exim4-config exim4-daemon-light file gnupg gpgv host initscripts isc-dhcp-client isc-dhcp-common
libbind9-60 libc-bin libc-dev-bin libc6 libc6-dev libc6-i386 libdns69 libdpkg-perl libexpat1 libgc1c2 libgssapi-krb5-2 libisc62 libisccc60 libisccfg62 libk5crypto3 libkrb5-3 libkrb5support0
liblwres60 libmagic1 libssl0.9.8 libxml2 linux-base linux-image-2.6.32-5-amd64 linux-libc-dev locales openssh-client openssh-server openssl perl perl-base perl-modules procps puppet
puppet-common python python-minimal sudo sysv-rc sysvinit sysvinit-utils tzdata
59 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
@melwinm
melwinm / gist:8383925
Last active February 20, 2022 12:23
osmdroid overlay item with alpha animation
package com.example.maptest;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
import org.osmdroid.DefaultResourceProxyImpl;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.ItemizedIconOverlay;