Skip to content

Instantly share code, notes, and snippets.

@theapache64
theapache64 / gist:1745fabda7744c2350c8
Created September 12, 2015 13:38
The below jQuery script will alert if the viewCount of a stackoverflow question changed.
$(document).ready(function(){
var prevViewCount = 0;
var isFirst = 1;
var url = window.location.href;
if(url.indexOf("/questions/") > -1){
console.log("Question found");
setInterval(function(){
@theapache64
theapache64 / gist:e7ebf9154f22ce75fad5
Created November 26, 2015 14:07
Quora - HideTopContent Script
$('div.EventHeader').each(function(i, heading) {
var headingData = heading.innerHTML;
console.log("Heading is "+headingData);
var hasTopContent = headingData.indexOf("Top Content on Quora")!=-1;
if(hasTopContent){
$(heading).closest(".pagedlist_item").css('opacity','0.2');
}
console.log("Has top content = "+hasTopContent);
});
@theapache64
theapache64 / Main.java
Created September 9, 2016 19:30
Speeder test
package lab;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
getGreenText = () => {
return (<ColorText text="Default text" color="green"/>);
}
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
getGreenText = () => {
return (<ColorText text="Default text" color="green"/>);
}
/*
*
* Created by Stone
* Email: bolan999999@gmail.com
* Date: 2017/12/2
*
*/
import React from 'react';
import {LargeList} from 'react-native-largelist';
public class SplashActivityViewModel extends BaseViewModel<SplashActivityNavigator> {
private static final int SPLASH_DURATION_IN_MILLIS = 1500;
public SplashActivityViewModel(@NonNull Application application, SplashActivityNavigator navigator) {
super(application, navigator);
}
void startWorking() {
public interface SplashActivityNavigator {
void openMainActivity();
void openLogInActivity();
}
public class SplashActivity extends BaseAppCompatActivity implements SplashActivityNavigator {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
final SplashActivityViewModel viewModel = ViewModelProviders
.of(this,