Skip to content

Instantly share code, notes, and snippets.

@eliagbenu
eliagbenu / bootstrap cheat sheet
Created February 13, 2014 16:58
Bootstrap cheat sheet
** download bootstrap from bootstrap site
**Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap
**download jquery.its needed.
**below is a template of a basic html file with bootstrap inclusive
**<!DOCTYPE html>
<html>
@eliagbenu
eliagbenu / Yii_project_setup_on_ubuntu
Last active August 29, 2015 14:00
Setup a Yii project on Ubuntu
#Extract yii source folder
#Copy framework folder, preferrablly into /var/www/yii/
#Run command
sudo php /var/www/yii/framework/yiic.php webapp /var/www/yii/my_example
# make sure you do, this will enable files access other assets it needs
@eliagbenu
eliagbenu / tmux-cheatsheet.markdown
Last active August 29, 2015 14:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@eliagbenu
eliagbenu / shake.xml
Last active September 8, 2015 16:23 — forked from simon-heinen/shake.xml
A simple shake / wiggle animation for Android
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:duration="70"
android:fromDegrees="-5"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="5"
android:repeatMode="reverse"
@eliagbenu
eliagbenu / gist:749bc965b1f5500e2471
Created February 29, 2016 15:36
Sample configuration for Nginx with Django
#Sample nginx server block and uwsgi .ini configuration
#path to ini
/etc/uwsgi/apps-available/site.ini
#path to nginx server block
/etc/nginx/sites-available/site
#sample nginx config server blk
## in models.py
class CustomerUserManager(BaseUserManager):
def _create_user(self, national_id, password,
is_staff, is_superuser, **extra_fields):
now = timezone.now()
if not national_id:
AndroidManifest.xml =>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.agbenu.splashscreenexample" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:fullBackupContent="true"
####in your nginx.conf server block
server {
# the port your site will be served on
listen 7002;
server_name localhost;
charset utf-8;
# Finally, send all non-media requests to the Django server.
@eliagbenu
eliagbenu / README-Template.md
Created December 13, 2018 10:34 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@eliagbenu
eliagbenu / index.php
Created January 26, 2019 22:10
Pull all records
<?php
$conn = mysqli_connect("localhost", "xxxx", "xxxx", "test");
Header("Content-Tye: application/json; charset=UTF-8");
if (mysqli_connect_errno()) {
echo json_encode(array("data"=>"Connection failed"));
exit();
}