Skip to content

Instantly share code, notes, and snippets.

View namzo's full-sized avatar

Ernest Ojeh namzo

View GitHub Profile
@adewale
adewale / gist:6e2baa8fdea65108b257fe9fbdae3b77
Created August 23, 2016 15:10
Common misconceptions about Progressive Web Apps
Common misconceptions about Progressive Web Apps
They have to be SPAs.
They have to live at pwa.*.com
They have to be mobile only.
They're not allowed to be responsive.
They have to use material design.
They only work in chrome.
They don't work in safari or on iOS.
They have to look like your android app.
@rdyson
rdyson / install-git-mjoave.md
Last active September 4, 2018 07:36
Install `git` on macOS 10.14 Mojave beta without installing brew

Install git on Mojave without brew

I was able to set up git without installing brew on Mojave (10.14 Beta 18A293u) as follows:

  1. Install XCode Beta (build 10L176w) from https://developer.apple.com/download
  2. Install Command Line Tools (macOS 10.14) for Xcode 10 Beta from https://developer.apple.com/download/more
  3. Set developer directory by running sudo xcode-select -s /Applications/Xcode.app/Contents/Developer in the terminal
  4. Verify that git works
@ireade
ireade / opera-mini-detect.js
Last active February 27, 2020 22:26
Detect if Opera Mini/Mobile is in Extreme or High Savings Mode
// Check if current browser is Opera
var isOpera = window.opera | window.opr | ( navigator.userAgent.indexOf(' OPR/') > -1 ) | ( navigator.userAgent.indexOf(' Coast/') > -1 ) | ( navigator.userAgent.indexOf(' OPiOS/') > -1 );
// Check if the Opera browser is Opera Mini or Opera Mobile in regular mode (called High Savings Mode)
var isOperaHigh = (navigator.userAgent.indexOf('OPR/') > -1) && (navigator.userAgent.indexOf('Mobile') > -1) && (navigator.userAgent.indexOf('Presto/') < 0);
// Check if the Opera browser is Opera Mini in Extreme Savings Mode
var isOperaExtreme = (navigator.userAgent.indexOf('Opera Mini/') > -1) && (navigator.userAgent.indexOf('Presto/') > -1);
import SwiftUI
import PlaygroundSupport
struct ClickWheel: View {
var body: some View {
ZStack {
Circle()
.fill(LinearGradient(
gradient: Gradient(stops: [
.init(color: Color(#colorLiteral(red: 0.21568627655506134, green: 0.21568627655506134, blue: 0.21568627655506134, alpha: 1)), location: 0),
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@ashander
ashander / unfavorite.js
Last active December 7, 2022 01:37
Delete all your favorites (unfavorite or unlike every tweet) on twitter.com (thx to @JamieMason and @b44rd for inspiring this)
// 1. Go to https://twitter.com/i/likes
// 2. Keep scrolling to the bottom repeatedly until all your favs are loaded.
// 3. Run this in your console (open in chrome by View > Developer > JavaScript Console)
// Notes: this may take a while if you have a lot of favs/likes
// you can only access your most recent ~2000 likes.
// inspired by https://gist.github.com/JamieMason/7580315
$('.ProfileTweet-actionButtonUndo').click()
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working
@msabramo
msabramo / git_prompt_info.zsh
Created April 11, 2012 00:07
The slowness of my zsh prompt when in a git-svn managed directory was killing me. I improved it by removing the git status stuff that slows it down...
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
@zhuowei
zhuowei / Ensemble.plist
Last active September 18, 2023 06:26
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- not sure which one it is, so set both -->
<key>Ensemble</key>
<dict>
<key>Enabled</key>
<true/>
</dict>
@udezekene
udezekene / O'Reilly Design Books (Free).md
Last active January 31, 2024 13:15 — forked from augbog/Free O'Reilly Books.md
Download the just released O'Reilly Design Books for free without e-mail signup.

Free O'Reilly Design Books and convenient script to just download them.

HUGE thanks to O'Reilly for making this resource free. Visit the design page if you want to learn more about the design resources. Also, they do have FREE resources for other topics like: Data, IoT, Programming, Security, Web Development, and WebOps.

Thanks @augbog for the initial gist. If you are a developer or looking for software engineering books, headover to the source of this fork.

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)