Skip to content

Instantly share code, notes, and snippets.

💻
I may be slow to respond.

Mark makunomark

💻
I may be slow to respond.
Block or report user

Report or block makunomark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@makunomark
makunomark / README.md
Created Sep 27, 2018
Bash script to quickly change your git configs
View README.md

Set the file as an executable

On Mac

  • Save file without an extension
  • Right click and select Get info
  • Click on the lock icon (set to unlocked)
  • Open terminal and navigate to saved location on file
  • execute chmod 700 switch_git
  • run the file :-)
@makunomark
makunomark / data.java
Created Jun 19, 2018
List of countries, codes and phone codes
View data.java
public class data {
public static final String[] countryNames = { "Afghanistan", "Albania",
"Algeria", "Andorra", "Angola", "Antarctica", "Argentina",
"Armenia", "Aruba", "Australia", "Austria", "Azerbaijan",
"Bahrain", "Bangladesh", "Belarus", "Belgium", "Belize", "Benin",
"Bhutan", "Bolivia", "Bosnia And Herzegovina", "Botswana",
"Brazil", "Brunei Darussalam", "Bulgaria", "Burkina Faso",
"Myanmar", "Burundi", "Cambodia", "Cameroon", "Canada",
"Cape Verde", "Central African Republic", "Chad", "Chile", "China",
View qn1b.l
%{
int in_string_array(char*, char**, int);
char **words;
int words_count = 0;
%}
%%
/* Match all words */
[^ \t\n]+ {
View qn1a.l
%{
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
int num_string = 0;
int num_char = 0;
%}
string [^\n\t ]+
%%
@makunomark
makunomark / Home.java
Last active Jul 29, 2016
To create an android bouncy badge on toolbar icon
View Home.java
public class Home extends AppCompatActivity{
...
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_shop, menu);
for (int i = 0; i < menu.size(); i++) {
Drawable drawable = menu.getItem(i).getIcon();
if (drawable != null) {
drawable.mutate();
drawable.setColorFilter(getResources().getColor(R.color.white), PorterDuff.Mode.SRC_ATOP);
@makunomark
makunomark / Activity.java
Last active Aug 22, 2017
Android Banner View with ViewPager
View Activity.java
...
CustomPagerAdapter mCustomPagerAdapter;
ViewPager mViewPager;
mCustomPagerAdapter = new CustomPagerAdapter(Home.this, imageList);
mViewPager = (ViewPager) findViewById(R.id.pager);
CirclePageIndicator circlePageIndicator = (CirclePageIndicator) findViewById(R.id.titles);
if (mViewPager != null && circlePageIndicator != null) {
You can’t perform that action at this time.