Skip to content

Instantly share code, notes, and snippets.

☠️
It may have escaped your notice but life isn't fair.

Junaid Farooq ijunaid8989

☠️
It may have escaped your notice but life isn't fair.
Block or report user

Report or block ijunaid8989

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View maze.rb
class Maze
# Generate a maze.
def generate(width, height)
@width = width
@height = height
@maze = Array.new
for y in 0 ... @height
for x in 0 ... @width
@maze[y * @width + x] = 1
View jsonrepsone
[
{
"id": 1528965627,
"Anger": 0,
"Disgust": 0,
"FaceDetected": 0,
"Fear": 0,
"Happiness": 0,
"LargeFaceDetected": 0,
"MotionDetected": 0,
@ijunaid8989
ijunaid8989 / 0-font-awesome-bootstap-phoenix.md
Created Jan 27, 2018 — forked from mbenatti/0-font-awesome-bootstap-phoenix.md
Installing Bootstrap + Font Awesome from NPM in Phoenix Framework using sass
View 0-font-awesome-bootstap-phoenix.md
  • Tested with Phoenix 1.3

1) Installing sass, font-awesome and bootstrap package's

First, install the Sass, Font Awesome, bootstrap(and deps) package:

cd assets

  • npm install --save-dev sass-brunch
  • npm install --save font-awesome
@ijunaid8989
ijunaid8989 / colone.sh
Created Jan 16, 2018
cloning db from herokuo
View colone.sh
#!/bin/sh
read -p "This will delete the local database 'evercam_live' and recreate
it from the live database. Are you sure you want to continue? (Y/N): " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
# Delete and create local 'evercam_live' database
View printing.rb
# version 1
for counter in 1..100
if (counter % 3 == 0) && (counter % 5 == 0)
puts 'Trakstar'
elsif (counter % 3 == 0)
puts 'Trak'
elsif (counter % 5 == 0)
puts 'Star'
else
View anagram.rb
module Enumerable # or require 'facets/enumerable/frequency'
def frequency
each_with_object(Hash.new(0)) { |item, counter| counter[item] += 1 }
end
end
def anagrams?(s1, s2)
frequency = proc { |s| s.gsub(/\s+/, "").downcase.chars.frequency }
frequency.(s1) == frequency.(s2)
end
View gist:f54436d6718b8b5cca398a3571d703d3
{
"tags": [],
"envelope": {
"sender": "support@evercam.io",
"transport": "smtp",
"targets": "marco@evercam.io"
},
"storage": {
"url": "https://sw.api.mailgun.net/v3/domains/evercam.io/messages/eyJwIjpmYWxzZSwiayI6ImRkZGNkYjAyLTNkMjUtNDFjMS05NWZjLWZlMTA1ZTBhZmY1MCIsInMiOiJhN2QwMWM0ZDc2IiwiYyI6InRhbmtiIn0=",
"key": "eyJwIjpmYWxzZSwiayI6ImRkZGNkYjAyLTNkMjUtNDFjMS05NWZjLWZlMTA1ZTBhZmY1MCIsInMiOiJhN2QwMWM0ZDc2IiwiYyI6InRhbmtiIn0="
View Client Logs
Mon Dec 18 15:51:00 2017 daemon.notice netifd: Network device 'pptp-vpnconn' link is down
Mon Dec 18 15:51:00 2017 daemon.notice pppd[19043]: Connection terminated.
Mon Dec 18 15:51:00 2017 local1.info hotplug-gsmstate[29590]: envACT: ifdown
Mon Dec 18 15:51:00 2017 local1.info hotplug-gsmstate[29590]: envINT: vpnconn
Mon Dec 18 15:51:00 2017 daemon.info pppd[19043]: Exit.
Mon Dec 18 15:51:00 2017 daemon.notice netifd: Interface 'vpnconn' is now down
Mon Dec 18 15:51:00 2017 daemon.notice netifd: Interface 'vpnconn' is setting up now
Mon Dec 18 15:51:00 2017 user.notice root: stopping ntpclient
Mon Dec 18 15:51:01 2017 daemon.info pppd[29688]: Plugin pptp.so loaded.
Mon Dec 18 15:51:01 2017 daemon.info pppd[29688]: PPTP plugin version 1.00
View PPTPD log
Dec 18 12:55:48 vpn pptpd[3147]: CTRL: Client 89.100.74.80 control connection started
Dec 18 12:55:49 vpn pptpd[3147]: CTRL: Starting call (launching pppd, opening GRE)Dec 18 12:55:49 vpn pppd[3148]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Dec 18 12:55:49 vpn pppd[3148]: pppd 2.4.7 started by root, uid 0
Dec 18 12:55:49 vpn pppd[3148]: Using interface ppp16
Dec 18 12:55:49 vpn pppd[3148]: Connect: ppp16 <--> /dev/pts/16
Dec 18 12:55:49 vpn pptpd[3147]: GRE: Bad checksum from pppd.
Dec 18 12:55:52 vpn pppd[3148]: peer from calling number 89.100.74.80 authorized
Dec 18 12:55:52 vpn pppd[3148]: MPPE 128-bit stateless compression enabled
Dec 18 12:55:52 vpn pppd[3148]: local IP address 192.168.80.1
Dec 18 12:55:52 vpn pppd[3148]: remote IP address 192.168.80.120
View data
[%EdgeCommander.ThreeScraper.SimLogs{__meta__: #Ecto.Schema.Metadata<:loaded, "sim_logs">,
addon: "60GB Broadband", allowance: "61,440.00 MB",
datetime: ~N[2017-09-28 05:50:04.783484], id: 607, name: "User 5 Sim",
number: "0864667951", volume_used: "18,977.80 MB"},
%EdgeCommander.ThreeScraper.SimLogs{__meta__: #Ecto.Schema.Metadata<:loaded, "sim_logs">,
addon: "60GB Broadband", allowance: "61,440.00 MB",
datetime: ~N[2017-10-10 17:09:19.712257], id: 645, name: "User 5 Sim",
number: "0864667951", volume_used: "45,746.76 MB"},
%EdgeCommander.ThreeScraper.SimLogs{__meta__: #Ecto.Schema.Metadata<:loaded, "sim_logs">,
addon: "60GB Broadband", allowance: "61,440.00 MB",
You can’t perform that action at this time.