Skip to content

Instantly share code, notes, and snippets.

View rahilwazir's full-sized avatar
🎯
Focusing (kinda)

Rahil Wazir rahilwazir

🎯
Focusing (kinda)
View GitHub Profile
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
npm run configuration
  • JavaScript file: /usr/local/lib/node_modules/npm/bin/npm-cli.js
  • Application parameters: run start
grunt run/debug configuration
  • JavaScript file: /usr/local/lib/node_modules/grunt-cli/bin/grunt
Issue Tracker
<?php
/**
* Usage:
* $message = 'My First Push Notification!';
* $pushServer = new PushSerer();
* $pushServer->pushToGoogle('REG-ID-HERE', $message);
* $pushServer->pushToApple('DEVICE-TOKEN-HERE', $message);
*/
class PushServer
<?php
/**
* Usage:
* $message = 'My First Push Notification!';
* $pushServer = new PushSerer();
* $pushServer->pushToGoogle('REG-ID-HERE', $message);
* $pushServer->pushToApple('DEVICE-TOKEN-HERE', $message);
*/
class PushServer
[
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Åland Islands",
"code": "AX"
},
{
{
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",
"font_face": "Monospace",
"font_size": 12,
"ignored_packages":
[
"Vintage"
],
"shift_tab_unindent": true,
"soda_classic_tabs": true,
@rahilwazir
rahilwazir / detect_bootstrap
Last active August 29, 2015 14:02
Detect existing Bootstrap (CSS)
$('link').each(function (index, element){
var bootExist = /bootstrap\.(?:min\.)?css/.test($(element).prop('href'));
if (bootExist) {
$(element).remove();
return false;
}
});
@rahilwazir
rahilwazir / so_code_fonts
Last active August 29, 2015 14:02
StackOverflow - Change font family of markdown
// ==UserScript==
// @name StackOverflow - Change font family of markdown
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://stackoverflow.com/*
// @copyright 2012+, You
// @grant none
// ==/UserScript==
@rahilwazir
rahilwazir / so_review
Created June 6, 2014 10:19
StackOverflow - Reviews
// ==UserScript==
// @name StackOverflow - Reviews
// @description Automatic enters to review section
// @match http://stackoverflow.com/review*
// @copyright 2014+, Rw
// @grant yes
// ==/UserScript==
var Reviews = (function() {
@rahilwazir
rahilwazir / autoloader
Created May 27, 2014 16:27
Autoloader PHP Classes with Namespace
namespace SearchBlox;
function spl_autoloader($class)
{
$file = RW_DIR . 'classes/' . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
if (file_exists($file)) {
include_once $file;
}
}