Skip to content

Instantly share code, notes, and snippets.

View eluleci's full-sized avatar

Emir Lüleci eluleci

View GitHub Profile
@eluleci
eluleci / steps.md
Created May 28, 2020 23:58
Publishing NPM package
  • Commit all your changes
  • Build the package for production
  • npm version patch to increase the package version's patch 0.0.x (use minor for 0.x.0 and major for x.0.0)
  • npm publish to publish the package on NPM
  • git push origin --tags to send the latest tag to the repository

Fetch latest tags

If any tag is deleted on remote, run git fetch origin refs/tags/*:refs/tags/* --prune to update the local tag list.

@eluleci
eluleci / separate-android-drawables.go
Created May 5, 2017 14:48
Go app that separates the list of android drawables. It expects icons to have ...-xhdpi.png suffix on all items.
package main
import (
"os"
"strings"
"io/ioutil"
)
func main() {
files, _ := ioutil.ReadDir("./")

sudo visudo

go ALL=(ALL) NOPASSWD: ALL

package ical
import "time"
type Calendar struct {
Prodid, Method string
Events []Event
}
func (c Calendar) String() string {
@eluleci
eluleci / Dockerfile
Last active November 17, 2015 09:46
Dockerfile for MongoDB instance
# Dockerizing MongoDB: Dockerfile for building MongoDB images
# Based on ubuntu:latest, installs MongoDB following the instructions from:
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
# Build image:
# docker build --tag dock/db .
# Run container:
# docker run -p HOST_PORT:27017 --name dock_mongo -d dock/db
@eluleci
eluleci / Dockerfile
Last active August 8, 2023 07:57
Dockerfile for Android CI
############################################################
# Dockerfile to build Android project and use Jenkins CI
#
############################################################
FROM ubuntu:14.04
MAINTAINER eluleci <emrullahluleci@gmail.com>
RUN apt-get update
@eluleci
eluleci / DatePickerFragment.java
Created April 14, 2015 11:36
Picking date with Fragment.
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import java.util.Calendar;
public class DatePickerFragment extends DialogFragment {
@eluleci
eluleci / AndroidManifest.xml
Created February 19, 2015 12:00
Facebook Login Implementation
<application
android:icon=”@drawable/ic_launcher”
android:label=”@string/app_name”>
...
<!—- Facebook login -->
<activity android:name=”com.facebook.LoginActivity” />
<meta-data
android:name=”com.facebook.sdk.ApplicationId”
@eluleci
eluleci / ImageInputHelper.java
Last active April 6, 2023 05:21
Android: Helper for Android for selecting image from gallery, taking a photo with camera and cropping image.
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.v4.app.Fragment;
import android.util.Log;
import java.io.File;
import java.io.IOException;
@eluleci
eluleci / docker-commands.md
Last active August 29, 2015 14:12
Docker useful commands

working with docker in terminal

$(boot2docker shellinit)

searching image from remote

docker search IMAGE_NAME

pulling image from remote