Skip to content

Instantly share code, notes, and snippets.

View hackur's full-sized avatar

Jeremy Sarda hackur

  • Las Vegas, NV
  • 06:19 (UTC -07:00)
View GitHub Profile
@hackur
hackur / create-react-app-on-heroku.sh
Created June 4, 2018 20:47 — forked from mars/create-react-app-on-heroku.sh
Create a React app & deploy to Heroku
## Global install of the app generator
npm install -g create-react-app
## Setup the app (first-time only)
create-react-app my-app
cd my-app
git init
# Create the Heroku app; requires free account at https://www.heroku.com/
heroku create -b https://github.com/heroku/heroku-buildpack-static.git
@hackur
hackur / SVG.js
Created April 9, 2018 23:26 — forked from beausmith/SVG.js
React Native SVG Component using react-native-svg
// React Native SVG Component
// https://github.com/react-native-community/react-native-svg
//
// Process
// 1. Clean up SVG in graphics app (Illustrator/Sketch/etc) to set consistent width, height, and make sure the viewBox is "0, 0, W, H"
// 2. Open SVG in text editor to remove width, height, and any undesired/unnecessary styles
// 3. Open in https://jakearchibald.github.io/svgomg/ and optimize.
// 4. Integrate info app by converting SVG tags to component-based SVG tags used in https://github.com/react-native-community/react-native-svg and updating with JS variables such that I can controls dimensions, colors, etc.
// 5. Use in other components.
//
@hackur
hackur / svg-css-inliner-color-hexer-gradient-defs-grouper-number-formatter.js Convert Illustrator SVG export into cross-platform CSS independent mode. CSS rule and style inlining, group gradients into a definitions tag, remove elements with display set to none, make colors hex. Works with react-native-web react-native-svg and svgs to give cross-platform web and native mobile rendering of any SVG produced in Illustrator.
/*
Open console.
(Import https://raw.githubusercontent.com/MikeMcl/decimal.js/master/decimal.js first if you want/need number formatting)
Then copy & paste this + enter, to run this.
Copy console output to a NewFile.js or NewFile.jsx file.
prettier --write NewFile.js
*/
/* eslint no-console: ["error", { allow: ["log"] }] */
/* global document, Decimal*/
(() => {
@hackur
hackur / dev-server.js
Created November 28, 2017 08:27 — forked from jamsesso/dev-server.js
Webpack dev server with a better proxy (http-proxy-middleware)
var express = require('express');
var path = require('path');
var webpackConfig = require('./webpack.config');
var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpackHotMiddleware = require('webpack-hot-middleware');
var proxyMiddleware = require('http-proxy-middleware');
var devConfig = webpackConfig.devServer;
var app = express();
@hackur
hackur / advancedsettings.xml
Created August 16, 2017 16:24 — forked from SimpleHomelab/advancedsettings.xml
AdvacedSettings.xml for Kodi with MySQL and other tweaks.
<!-- General Settings -->
<advancedsettings>
<loglevel hide="true">-1</loglevel> <!-- Comment: Disables logging -->
<playcountminimumpercent>95</playcountminimumpercent>
<skiploopfilter>0</skiploopfilter> <!-- Comment: For RPi or similar use 16 or higher (low CPU usage) -->
<nodvdrom>true</nodvdrom>
<!-- MySQL Library -->
<videodatabase>
<type>mysql</type>
@hackur
hackur / raspberry-pi-config.sh
Created July 29, 2017 12:25 — forked from lamberta/raspberry-pi-config.sh
Useful settings for my Raspberry Pi.
# Finish headless installation via `ssh pi@192.168.2.x`
# See /boot/config.txt
sudo apt-get update && sudo apt-get --purge dist-upgrade
sudo raspi-config
# Add locale en.us-utf8 (but keep en.gb-utf8)
sudo dpkg-reconfigure locales
# Timezone
sudo dpkg-reconfigure tzdata
# Update firmware
@hackur
hackur / Aircrack Commands
Created June 17, 2017 02:00 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@hackur
hackur / getBlockLists.sh
Created June 10, 2017 09:00 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@hackur
hackur / useful-macos-sierra-commands.zsh
Last active June 17, 2017 09:17
Useful MacOS Sierra Commands
# DON'T BE STUPID
# THIS SCRIPT IS NOT MEANT TO BE RUN ALL AT ONCE
# DO NOT RUN ANY OF THESE COMMANDS UNLESS YOU KNOW WHAT YOU'RE DOING
# These are some commands I freqently find myself using. I'm saving them here for my own reference.
# Check the current status of System Integrity Protection (SIP)
csrutil status
# Reset Permissions on MacOS Sierra the same way you used to with previous versions of OS X.
@hackur
hackur / Laravel-Infyom-Scaffold-All-Existin-Tables-In-Database.php
Created November 26, 2016 08:05
Laravel-Infyom-Scaffold-All-Existin-Tables-In-Database.php
<?php
collect($results)->pluck('Tables_in_DATABASENAME')->each(function($table){
system('php artisan infyom:scaffold '.$table.' --fromTable --tableName='.$table);
});