Skip to content

Instantly share code, notes, and snippets.

View zeusbaba's full-sized avatar
💻
artemis19

Yilmaz Guleryuz zeusbaba

💻
artemis19
View GitHub Profile
@zeusbaba
zeusbaba / using-chromium-for-local-dev.txt
Last active November 24, 2017 13:33
using-chromium-for-local-dev
>> installing & using CHROMIUM <<
- download CHROMIUM from https://www.chromium.org/Home
- how to run it with custom params, see here:
https://stackoverflow.com/a/42024918/492918
- and here is an example that disables CORS, local security validation, etc
chromium.exe --args --disable-web-security --user-data-dir --allow-insecure-localhost
@zeusbaba
zeusbaba / post-on-page-load.js
Last active November 21, 2017 17:59
Post-on-load
window.onload = function () {
postJsonData().then(function (theResult) {
console.log("theResult: " + theResult);
// do something else if necessary
});
}
function getJsonData() {
targetUrl = "https://api.etcetc.com/gooo";
return new Promise(function (resolve, reject) {
@zeusbaba
zeusbaba / .eslintrc.js
Last active October 13, 2017 07:55
ESLINT via the easiest way
/*
// adapted from https://medium.com/@netczuk/your-last-eslint-config-9e35bace2f99
How to enable ESLINT via the easiest way?
1) prepare this file .eslintrc.js
2) remember to update .gitignore like this;
# Ignore all dotfiles...
@zeusbaba
zeusbaba / MyDateTimeInput.jsx
Last active February 26, 2018 08:18
admin-on-rest using material-ui-datetimepicker as custom input component
import React, { Component } from 'react';
import DateTimePicker from 'material-ui-datetimepicker';
import DatePickerDialog from 'material-ui/DatePicker/DatePickerDialog'
import TimePickerDialog from 'material-ui/TimePicker/TimePickerDialog';
import { Field } from 'redux-form';
const renderMyDateTimeInput = ({ input, meta: { touched, error } }) => (
// for more customisation, see https://github.com/dmtrKovalenko/material-ui-datetimepicker
/***
* Copyleft - incognito
*
* @author: incognito_at_wareninja
* @see https://github.com/WareNinja
* disclaimer: I code for fun, dunno what I'm coding about :)
*/
package utils;
package twitter_loop;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.Mongo;
import com.mongodb.MongoException;
import java.net.UnknownHostException;
import java.util.List;
@zeusbaba
zeusbaba / FileIndexerUtil.java
Last active December 14, 2015 15:19
FileIndexerUtil for this & that
/***
* Copyleft - Almighty Matrix!
*
* @author: yg@wareninja.com
* @see https://github.com/WareNinja
* disclaimer: I code for fun, dunno what I'm coding about :)
*/
package utils;