Skip to content

Instantly share code, notes, and snippets.

View ishuah's full-sized avatar
🔨
Build

Ishuah E Kariuki ishuah

🔨
Build
View GitHub Profile
@eefret
eefret / NetworkStateReceiver.java
Created April 16, 2015 19:27
A Simple but powerfull Network State Receiver for android implementing listeners
public class NetworkStateReceiver extends BroadcastReceiver {
protected List<NetworkStateReceiverListener> listeners;
protected Boolean connected;
public NetworkStateReceiver() {
listeners = new ArrayList<NetworkStateReceiverListener>();
connected = null;
}
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 10, 2024 08:13
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@turboladen
turboladen / psql_encoding.sql
Created October 2, 2013 08:46
Script for dealing with creating Postgres databases that complain with: ``` PG::InvalidParameterValue: ERROR: encoding UTF8 does not match locale en_US DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1. ``` ...when trying to create the production DB. Taken from: http://stackoverflow.com/questions/13115692/encoding-utf8-does-not-match-…
sudo su postgres
psql
update pg_database set datistemplate=false where datname='template1';
drop database Template1;
create database template1 with owner=postgres encoding='UTF-8'
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
update pg_database set datistemplate=true where datname='template1';