Skip to content

Instantly share code, notes, and snippets.

View syntaxhacker's full-sized avatar
🧠
upgrading...

Rohit J syntaxhacker

🧠
upgrading...
View GitHub Profile
/* ----------------------------------------------------------------------------------------------------
Super Form Reset
A couple of things to watch out for:
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered.
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders.
- You NEED to set the font-size and family on all form elements
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@syntaxhacker
syntaxhacker / stream.js
Created February 11, 2020 07:55 — forked from DingGGu/stream.js
NodeJS Mp3 Streaming ExpressJS
var express = require('express');
var app = express();
var fs = require('fs');
app.listen(3000, function() {
console.log("[NodeJS] Application Listening on Port 3000");
});
app.get('/api/play/:key', function(req, res) {
var key = req.params.key;
@syntaxhacker
syntaxhacker / postman.desktop
Created January 23, 2020 17:41 — forked from hauthorn/postman.desktop
Postman desktop entry
[Desktop Entry]
Type=Application
Version=1.0
Name=Postman
Comment=Supercharge your API workflow
Icon=/home/hauthorn/Programs/Postman/resources/app/assets/icon.png
Exec="/home/hauthorn/Programs/Postman/Postman"
@syntaxhacker
syntaxhacker / delete-heroku-apps.sh
Created January 22, 2020 18:49 — forked from naaman/delete-heroku-apps.sh
Delete all heroku apps from bash terminal -- no script file required
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done
@syntaxhacker
syntaxhacker / zsh.md
Created January 14, 2020 06:58 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
from matplotlib import pyplot as plt
import cv2
img = cv2.imread('/Users/mustafa/test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
plt.imshow(gray)
plt.title('my picture')
plt.show()
@syntaxhacker
syntaxhacker / Documentatio_bigint.md
Created June 11, 2019 14:37 — forked from harshraj22/Documentatio_bigint.md
A documentation for using the bigint.cpp

How to use ?

1. Create an instance (object) by either of the following ways :

1.1 Without providing any initial value -
    bigint b;
    cout<<b<<"\n"; 
0
1.2. With a long long int -
@syntaxhacker
syntaxhacker / regexCheatsheet.js
Created April 23, 2019 13:10 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@syntaxhacker
syntaxhacker / comp_macros.h
Created April 4, 2019 19:03 — forked from abinashmeher999/comp_macros.h
Some of the most used macros in competitive programming
#include <cmath>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream> // istringstream buffer(myString);