Skip to content

Instantly share code, notes, and snippets.

View ArslanKathia's full-sized avatar
🌏
Working from home

Arslan Maqbool ArslanKathia

🌏
Working from home
View GitHub Profile
@jrfnl
jrfnl / wp-config-debug.php
Last active May 23, 2024 07:06
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
@gabrielemariotti
gabrielemariotti / build.gradle
Last active January 12, 2024 17:41
Use signing.properties file which controls which keystore to use to sign the APK with gradle.
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
{
"status": "success",
"search_nag": {},
"code": 0,
"bookmark": "b28xMDB8MDQ0NWZiOTBjNzNiODlkOTQ1ZTk3ZjY0ZTBhYjU0YjM0ZDYyNDg3NjU3ZWQ3OGJmZjI4ZTliZGRmODBlMzJlNQ==",
"debug_data": {
"query_data": {}
},
"message": "ok",
"data": [
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 7, 2024 13:13
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
===== begin copy =====
Dear Hiring Manager,
I would like to express my interest in the {{position}} position posted in the career section of your site. I have enclosed my resume detailing my unique skill set for you.
I recently graduated from the User Experience Design Immersive program at General Assembly where I improved my skills in most every facet of user experience design. I esspecially excelled at {{user research methods, prototyping, wireframing, user flows, and interaction design}}. Plus, I hold a BFA in Digital Art from the University of Washington. I have an insatiable passion for designing great digital products and to cultivate myself at {{company}} in a design capacity would be a dream for me.
As a design consultant for Centro Community Partners, I was given the opportunity to use my skills in interaction design and product development to lay plans for a mobile application for business consultants. I developed {{features, user research, personas, site map, wireframes ,user flows, and many it
@jmervine
jmervine / cert_convert.sh
Created November 17, 2014 21:57
openssl: convert cert from p7b to crt (or cer)
openssl pkcs7 -print_certs -in old.p7b -out new.crt
# openssl pkcs7 -print_certs -in old.p7b -out new.cer
@iPaulPro
iPaulPro / include_list_viewpager.xml
Last active March 7, 2024 11:13
CollapsingToolbarLayout with TabLayout
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
@enginebai
enginebai / MainActivity.java
Last active July 27, 2021 11:10
Get the current location and display a marker on Google Map.
package com.enginebai.sample;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
@keithweaver
keithweaver / domain-to-aws-ec2-instance.md
Created March 20, 2017 23:49
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).