Skip to content

Instantly share code, notes, and snippets.

View afidegnum's full-sized avatar

KOKOU AFIDEGNON afidegnum

  • FlashTHub
View GitHub Profile
@afidegnum
afidegnum / myfab_.gitignore
Created June 13, 2017 08:21
sample application using FAB but has few errors i m trying to fix
*.pyc
app.db
./tmp
./build/*
./.idea
./.idea/*
env
venv
*.sublime*
@afidegnum
afidegnum / colors.py
Created August 3, 2017 07:28
Fectching Category and Colors
/home/afidegnum/fab/bin/python2.7 /home/afidegnum/Downloads/pycharm-2017.1.5/helpers/pydev/pydevconsole.py 35825 37077
PyDev console: starting.
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/home/afidegnum/PycharmProjects/ladiespage'])
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
>>> from app.models import Color
/home/afidegnum/fab/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py:800: UserWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True to suppress this warning.
@afidegnum
afidegnum / recursive.sql
Created August 11, 2017 17:43
link tree and related table
I have 2 tables.
category and products. [from google product](https://www.google.com/basepages/producttype/taxonomy.en-US.txt) taxonomy tree i was able to reconstruct the entire tree.
i have the following tables,
```
CREATE TABLE public.category
(
id integer NOT NULL DEFAULT nextval('category_id_seq'::regclass),
@afidegnum
afidegnum / recursive.sql
Created August 11, 2017 17:43
link tree and related table
I have 2 tables.
category and products. [from google product](https://www.google.com/basepages/producttype/taxonomy.en-US.txt) taxonomy tree i was able to reconstruct the entire tree.
i have the following tables,
```
CREATE TABLE public.category
(
id integer NOT NULL DEFAULT nextval('category_id_seq'::regclass),
cjPath := "cj_items"
files, err := ioutil.ReadDir(cjPath)
if err != nil {
log.Fatal(err)
}
for _, f := range files {
if filepath.Ext(f) == ".txt" {
@afidegnum
afidegnum / index.html
Created June 8, 2019 09:07
Practice: HTML/CSS Layout
<body>
<div id="wrapper">
<div id="header">
<h1>Logo</h1>
<div id="nav">
<ul>
<li><a href="">Home</a></li>
<li><a href="">Products</a></li>
<li><a href="">Services</a></li>
<li><a href="">About</a></li>
PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
@afidegnum
afidegnum / destructuring.md
Created June 6, 2020 15:27 — forked from yang-wei/destructuring.md
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
module Main exposing (..)
import Browser
import Browser.Navigation as Nav
import Dropdown
import Element exposing (Element, centerX, centerY, column, el, fill, fillPortion, focused, height, image, mouseOver, padding, paddingEach, paddingXY, px, rgb255, rgba255, row, spacing, spacingXY, text, width)
import Element.Background as Background
import Element.Border as Border
import Element.Font as Font
import Element.Input as Input
@afidegnum
afidegnum / archinstall.md
Last active January 3, 2021 13:11 — forked from lynx570/archinstall.md
Windows 10 and Arch Linux dual boot with UEFI

Arch Linux installation (Windows 10 dual boot)

Convert Partition from MBR to GPT

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

Use gdisk to convert the partition table to GPT.c
```
    gdisk /dev/sda