Skip to content

Instantly share code, notes, and snippets.

View timotew's full-sized avatar
A bit busy on bitbucket

Olaoluwa Peters timotew

A bit busy on bitbucket
View GitHub Profile
@timotew
timotew / fs.js
Created January 20, 2018 00:46
fs path test
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
import React, {Component} from 'react';
import {View, Animated, TouchableOpacity} from 'react-native';
import * as Progress from 'react-native-progress';
import TouchableIcon from './TouchableIcon';
import PropTypes from 'prop-types';
import constants from '../constants';
@timotew
timotew / Screenshot_20180201-171603.png
Last active February 1, 2018 21:21
CIPG INTEGRATION GUIDE
Screenshot_20180201-171603.png
<input type="file" (change)="upMedia($event)" class="image custom-file-input" item-end />
<VirtualHost *:80> // Fix to :8080, your port the server runs on
ServerName comm-app.local
DocumentRoot "C:/xampp/htdocs/CommunicationApp/public"
SetEnv APPLICATION_ENV "development"
<Directory "C:/xampp/htdocs/CommunicationApp/public" // location of your project
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
@timotew
timotew / git-gpg.md
Created July 24, 2018 17:05 — forked from bcomnes/git-gpg.md
my version of gpg on the mac
  1. brew install gnupg21, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg2 --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@timotew
timotew / terms
Last active September 15, 2019 16:41
Terms changes
Making it VISIBLE IN RESULT
1. Add “term(int)” to “exam_list” table
2. Add term as second parameter of the “StudentController->marksheet(id, term)”
3. Use the term as where clause in the exam_list query inside “marksheet” function
4. Add “term(int)” to “exam_marks” table
5. Use term as a where clause parameter in the “exam marks query”
6. Include the “term in the loop to add all exam marks value to the ”subjectArray”
@timotew
timotew / README.md
Created February 18, 2020 15:02 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@timotew
timotew / link.js
Created February 3, 2021 20:34
Linked list question
@timotew
timotew / image-tags.js
Last active February 14, 2021 08:26
find image tags in string
let data = `This is the cap you unscrew to open when you refuel your car
<img alt="blah" src="https://www.lifesure.co.uk/cms/wp-content/uploads/2011/04/Tyre-Illustration-5010.jpg" />
This is the cap you unscrew to open when you refuel your car ssd
<img alt="blah" src="https://www.lifesure.co.uk/cms/wp-content/uploads/2011/04/Tyre-Illustration-5020.jpg" />
This is the cap you unscrew to open when you refuel your car dfdfgfgfgfd
<img alt="blah" src="https://www.lifesure.co.uk/cms/wp-content/uploads/2011/04/Tyre-Illustration-5030.jpg" />
dfhdjjdshfsdjdjkfgfgfgfgf
<img alt="blah" src="https://www.lifesure.co.uk/cms/wp-content/uploads/2011/04/Tyre-Illustration-5040.jpg" />
`;