Skip to content

Instantly share code, notes, and snippets.

View S-codes14's full-sized avatar
:octocat:
opensource != charity

S-codes14 S-codes14

:octocat:
opensource != charity
View GitHub Profile
@S-codes14
S-codes14 / facebook-login.html
Created September 15, 2021 02:05
from brad travesy
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SocialAuth</title>
<link rel="stylesheet" href="http://bootswatch.com/darkly/bootstrap.min.css">
<style media="screen">
#fb-btn{margin-top:20px;}
#profile, #logout, #feed{display:none}
</style>
const crypto = require('crypto')
const get = require('simple-get')
const OAuth = require('oauth-1.0a')
const querystring = require('querystring')
const TW_REQ_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'
const TW_AUTH_URL = 'https://api.twitter.com/oauth/authenticate'
const TW_ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token'
class LoginWithTwitter {
@S-codes14
S-codes14 / setan.py
Last active July 25, 2023 19:16
Hack facebook
#!/usr/bin/python
# coding=utf-8
# pashakun.com
#Import module
import os,sys,time,datetime,random,hashlib,re,threading,json,getpass,urllib,cookielib
from multiprocessing.pool import ThreadPool
try:
import mechanize
except ImportError:
@S-codes14
S-codes14 / TimeLineStyles.js
Created August 28, 2021 03:18
timeline component
import styled from 'styled-components'
export const CarouselContainer = styled.ul`
max-width: 1040px;
background: #0F1624;
padding: 0rem;
list-style:none;
display: flex;
justify-content: space-between;
@S-codes14
S-codes14 / fb-hooks.js
Last active August 8, 2021 03:54
react component, facebook hook
import React from "react";
// Injects the Facebook SDK into the page
const injectFbSDKScript = () => {
(function (d, s, id) {
var js,
fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
@S-codes14
S-codes14 / facebook-sdk.js
Created August 8, 2021 03:50
The source code to facebook sdk
/*1628393708,,JIT Construction: v1004222318,en_US*/
/**
* Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
@S-codes14
S-codes14 / graphs.js
Created May 22, 2021 04:18
Graphs: breadth-first search
/* Graphs: Breadth-first search */
function bfs(graph, root) {
var nodesLen = {};
for (var i = 0; i < graph.length; i++) {
nodesLen[i] = Infinity;
}
nodesLen[root] = 0;
@S-codes14
S-codes14 / heap.js
Created May 22, 2021 04:16
Heap (max and min)
/* Heaps */
// left child: i * 2
// right child: i * 2 + 1
// parent: i / 2
let MinHeap = function() {
let heap = [null];
@S-codes14
S-codes14 / trie.js
Created May 22, 2021 04:15
the trie data structure
/* Trie Data Structure */
let Node = function() {
this.keys = new Map();
this.end = false;
this.setEnd = function() {
this.end = true;
};
this.isEnd = function() {
return this.end;
@S-codes14
S-codes14 / linkedlist.js
Created May 22, 2021 04:13
linked list in js
/* LinkedList */
function LinkedList() {
var length = 0;
var head = null;
var Node = function(element){
this.element = element;
this.next = null;
};