Skip to content

Instantly share code, notes, and snippets.

View aminukano585's full-sized avatar
🎯
Focusing

Aminu Ibrahim Abubakar aminukano585

🎯
Focusing
View GitHub Profile
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active April 17, 2024 12:44
Online Resources For Web Developers (No Downloading)
@bakoushin
bakoushin / sw.js
Created February 1, 2018 08:14
ServiceWorker Fetch Examples — Hijacking Requests
self.addEventListener('fetch', event => {
/*
HIJACKING RESPONSE EXAMPLES
Uncomment examples one by one to see how it works.
Don't forget to enable 'Update on reload' in Application - Service Workers.
*/
// Example 1: respond with arbitrary HTML
@ann-mukundi
ann-mukundi / Working with branches
Created January 23, 2018 13:26
CP-readiness: git branches
Create a github account here
Create a new repository on github with the name cp-readiness
Follow the instructions to push an existing repository from the command line
In your local machine, create a branch called recipes
Switch to the new branch
In a folder called recipe, create a file called tea.txt
Add the changes to staging
Push to the recipes branch
@ann-mukundi
ann-mukundi / Intro to Git
Created January 23, 2018 13:19
Cp-readiness
Exercise 1
Install Git on their computer
Create a folder called cp-readiness on your local computer
Navigate to the folder and initialize it with git.
Create a file called README.md with a short a short intro of who you are to this folder
Check the status of your repo
Add the file README.md to the staging area
Commit with the message Initial Commit
@auser
auser / timeline.css
Last active December 30, 2022 05:14
.demo {
position: relative;
}
.demo .notificationsFrame {
z-index: 2;
width: 100%;
top: 20px;
background: #fff;
border-radius: 3px;
overflow: hidden;
@jonsamp
jonsamp / main.js
Last active October 21, 2017 02:49
JavaScript Tips Tab: Solution
// List of JavaScript tips
var tipsList = [
"Don't forget the <span class='code'>var</span> keyword when assigning a variable's value for the first time.",
"<span class='code'>undefined</span>, <span class='code'>null</span>, <span class='code'>0</span>, <span class='code'>false</span>, <span class='code'>NaN</span>, and <span class='code'>''</span> (empty string) are all falsy.",
"Declare a function with<br/> <span class='code-block'>function <em>myFunctionName</em>() { <br>&nbsp;&nbsp;...<br> }</span>",
"<span class='code'>if</span>/<span class='code'>else</span> statements look like <br/> <span class='code-block'>if (<em>condition</em>) { <br/>&nbsp;&nbsp;...<br/>} else { <br/>&nbsp;&nbsp;...<br/>}",
@2E0PGS
2E0PGS / linux-usb-file-copy-fix.md
Last active April 12, 2024 13:19
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

anonymous
anonymous / sample
Created May 20, 2015 20:53
<Text View
android:text="Hapy Birthday"
android:layout_width="150dp"
android:layout_height="150"
android:background="@android:color/darker_groy"
>
@threepointone
threepointone / gist:43f16389fd96561a8b0b
Last active February 13, 2023 02:12
sto alternate api
// store.js
let {store, handler} = sto(initialState, reduceFn); // where reduceFn: function(currentState, action, ...args){}
dispatcher.register(handler);
export store;
// elsewhere
store.get() // -> current state
store.toObservable() // -> to be used with .observe()
@ff6347
ff6347 / clone_remote_branch.md
Last active April 13, 2023 19:34
clone remote branch with git