Skip to content

Instantly share code, notes, and snippets.

View suciptoid's full-sized avatar
👋
Hello World

Sucipto suciptoid

👋
Hello World
View GitHub Profile
@suciptoid
suciptoid / header.cpp
Created February 9, 2015 01:26
Header
#ifndef HTTPTHREAD_H
#define HTTPTHREAD_H
#include <QThread>
#include <QTcpSocket>
class FortuneThread : public QThread
{_
Q_OBJECT
@suciptoid
suciptoid / example.php
Last active July 1, 2018 15:08
Yandex class for translate
<?php
/*
* Created by Sucipto
* http://www.sucipto.net
* June 2015
*/
include 'yandex.php';
@suciptoid
suciptoid / unattended-mysql_secure_installation.md
Last active August 29, 2015 14:28 — forked from vdvm/unattended-mysql_secure_installation.md
A way to run mysql_secure_installation unattended

Mysql Secure Installation (Unattended)

NB : MyPass is your current mysql password

echo -e "MyPass\nn\nY\nY\nY\nY\n" | mysql_secure_installation 2>/dev/null

Result:


NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
@suciptoid
suciptoid / ibnads.xl.co.id.js
Created December 27, 2015 14:13
ibnads.xl.co.id iframe script
//09/22/2015/22:54//iframeJs
var targetUrl = window.location.href;
if (self !== top) {
self.location.href = targetUrl
}
var iframe = iframe || {
object: null,
init: function init() {
this.object = document.getElementById("main-frame")
},
@suciptoid
suciptoid / admin.php
Last active March 1, 2016 15:13
Simple PHP Login
<?php session_start();
if(isset($_SESSION['username'])){
echo "Hi Admin, user kamu ".$_SESSION["username"];
}else{
header('Location: index.php');
}
?>
package com.pringstudio.cobaandroidtest;
import android.test.ActivityInstrumentationTestCase2;
import android.test.TouchUtils;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
/**
* Created by sucipto on 4/14/16.
package com.pringstudio.cobaandroidtest;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
repoObservable = Observable.from(listRepo);
repoObservable.subscribe(new Subscriber<GithubRepo>() {
@Override
public void onCompleted() {
Log.d("GithubRepo","Load done");
}
@Override
public void onError(Throwable e) {
@suciptoid
suciptoid / MainActivity.java
Created August 1, 2016 15:13
Setelah ambil data dari API
service.getRepos("showcheap")
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<List<GithubRepo>>() {
@Override
public void onCompleted() {
}
@Override
@suciptoid
suciptoid / .travis.yml
Created October 26, 2016 04:22
Travis CI for Qt 5 Project
sudo: required
dist: trusty
before_install:
- sudo add-apt-repository --yes ppa:beineri/opt-qt551-trusty
- sudo apt-get update -qq
install:
- sudo apt-get -y install qt55[QTPACKAGE]