Skip to content

Instantly share code, notes, and snippets.

View manikrathee's full-sized avatar
🎯
Focusing

Manik Rathee manikrathee

🎯
Focusing
View GitHub Profile
@manikrathee
manikrathee / tinfoil.md
Created December 4, 2016 19:58 — forked from ascott1/tinfoil.md
The levels of internet privacy

These are some steps that users can take to retain privacy online. These aren't perfect, but aim to strike a balance between privacy and usability.

Level 1

  • Enable Do Not Track in your browser
  • Use a tracker blocking plugin such as Privacy Badger or Ghostery
  • Disable third-party cookies
  • Use the HTTPS Everywhere browser extension
<!-- Stand against bigotry and hate. -->
<!-- This was illustration is free to share and use. -->
<style>
#safety-pin-day-one {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
@manikrathee
manikrathee / sketch-keybindings.md
Created February 9, 2016 18:53
A list of keyboard shortcuts for Sketch.app

For more info about the code for each special key (command, option, etc) access: http://osxnotes.net/keybindings.html

  • Command ⌘
  • Shift ⇧
  • Option ⌥
  • Control ⌃
Menu Action name Keyboard Shortcut
@manikrathee
manikrathee / Instructions.md
Created December 1, 2015 01:21 — forked from daneden/Instructions.md
Remap Caps Lock to Emoji on Mac

How to remap the caps lock key to the emoji selector on Mac

  1. Go to System Preferences -> Keyboard -> Modifier Keys...
  2. Change “Caps Lock” to “No action”
  3. Install Seil
  4. Change the Caps Lock key in Seil to keyCode 80 (F19)
  5. Install Karabiner
  6. Open Karabiner and go to Misc & Uninstall -> Open private.xml
  7. Copy the contents of this gist's example to the XML file and save
  8. In Karabiner, go to Change Keys -> Reload XML
@manikrathee
manikrathee / emoji.js
Created October 28, 2015 19:32 — forked from minamarkham/emoji.js
Add emojis to URL
function emoji() {
if (navigator.userAgent.indexOf('Mac OS X') != -1) {
window.location.hash = "💋";
}
};
emoji();
// only works on Macs 😞
///
/// Calculates the color of a linear gradient at a specific point.
///
/// @param {Color} $start - gradient’s start color
/// @param {Color} $end - gradient’s end color
/// @param {Number} $point - point of the gradient (between 0 and 1, or 0% and 100%) at which we want the color
/// @return {Color}
///
/// @example scss
/// background-color: gradient-color-at(#BBE087, #DCDE85, 0.4);
// for an updated version see https://github.com/jsdf/react-native-refreshable-listview
var React = require('react-native')
var {
ListView,
ActivityIndicatorIOS,
StyleSheet,
View,
Text,
} = React
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@manikrathee
manikrathee / iOS-scrollbar.js
Created November 4, 2014 06:33
Hide the nav bar in ios. Antiquated, terrible, probably broken by now, don't use this.
window.addEventListener("load",function() {
setTimeout(function(){
window.scrollTo(0, 0);
}, 0);
});