Skip to content

Instantly share code, notes, and snippets.

View nekofar's full-sized avatar
💭
I may be slow to respond.

Milad Nekofar nekofar

💭
I may be slow to respond.
View GitHub Profile
@nekofar
nekofar / brew-sync.sh
Last active November 21, 2021 07:11 — forked from witt3rd/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@nekofar
nekofar / ui-widget-select.sh
Created September 20, 2020 21:43 — forked from blurayne/ui-widget-select.sh
Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes)
#!/bin/bash
##
# Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes)
#
# Author: Markus Geiger <mg@evolution515.net>
# Last revised 2019-09-11
#
# ATTENTION! TO BE REFACTORED! FIRST DRAFT!
#
@nekofar
nekofar / cycle-list.php
Created July 22, 2018 20:54 — forked from chartjes/cycle-list.php
My PHP script for creating a Twitter list where people cycle on and off it based on 30 days of interaction
<?php
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
// You can get all these via https://dev.twitter.com/
$consumer_key = "";
$consumer_secret = "";
$access_token = "";
$access_token_secret = "";
$user_id = 0; // Twitter user ID
<?php
/*
Plugin Name: Super Socializer
Plugin URI: https://super-socializer-wordpress.heateor.com
Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Media follow and more.
Version: 7.11.10
Author: Team Heateor
Author URI: https://www.heateor.com
Text Domain: super-socializer
Domain Path: /languages
@nekofar
nekofar / mutualTwitterFriends.php
Created July 19, 2018 03:33 — forked from maurerbot/mutualTwitterFriends.php
PHP Script to get Twitter mutual relationship ids and their user details
<?php
//sharing this logic because twitter doesn't give you and end point to get mutual relationships (uses zend mvc framework for requests but it is easy enough to use something else to make the API requests)
//note: $this->source variable is a standard object that holds access token and user information for the user doing the requests
$cursor = -1; //initial position for twitter API friends and follower endpoint (important for users with more then 5000 followers/friends)
do {
//get the first 5000 following ids
if [ ! -e ~/.antigen/source/antigen.zsh ];then
mkdir ~/.antigen
git clone https://github.com/zsh-users/antigen.git ~/.antigen/source
fi;
if [ ! -e "$HOME/.scm_breeze/scm_breeze.sh" ];then
git clone git://github.com/scmbreeze/scm_breeze.git ~/.scm_breeze
fi;
source ~/.antigen/source/antigen.zsh
@nekofar
nekofar / unblock_all.py
Created January 3, 2018 23:46 — forked from kristopherjohnson/unblock_all.py
Unblock all blocked Twitter accounts
#!/usr/bin/env python3
# Dependency: pip3 install twitter
import twitter
# Go to http://apps.twitter.com/, create an app, and fill in these values:
consumer_key = 'www'
consumer_secret = 'xxx'
access_token = 'yyy'
access_token_secret = 'zzz'

TestViewPagerWithFixedFooter

See it in action on an Android 2.2 (API 8) emulator :

import android.app.Application;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
import krishan.dhancha.controller.receiver.NetworkStateReceiver;
import timber.log.Timber;
/**
* Created by Krishan on 16-Aug-14.
*/
@nekofar
nekofar / 0_reuse_code.js
Created January 20, 2014 20:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console