Skip to content

Instantly share code, notes, and snippets.

@xerosanyam
xerosanyam / main.js
Created October 5, 2017 12:21
add semantic ui to vuejs
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
window.$ = window.jQuery = require('jquery')
require('semantic-ui-css/semantic.css')
require('semantic-ui-css/semantic.js')
Vue.config.productionTip = false
function countDigits(digits){
var i = 0;
while(digits>0){
i++
digits = parseInt(digits/10)
}
console.log(i)
}
@xerosanyam
xerosanyam / Back Template
Last active March 24, 2023 23:31
My settings for Anki. This include 15 sec timer and left align
{{Front}}
<hr>
{{Back}}
@xerosanyam
xerosanyam / 1.md
Created June 16, 2018 11:19
Enable https on wordpress blog using bitnami stack with ssl
  1. try to access https://blog.spext.co

  2. if doesn't work, run letsc encrypt script given by bitnami

  3. try to access the https link now

  4. force nginx to route to https

@xerosanyam
xerosanyam / write.js
Created August 18, 2018 04:56
write to file in node
var fs = require('fs');
fs.writeFile("list.js", JSON.stringify(list), function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
});
const TEMP = require('./temp.js')
@xerosanyam
xerosanyam / Statistics.js
Created July 22, 2019 12:45 — forked from Sirfrummel/Statistics.js
Loading Segment.io analytics.js open source version async
// Create a dummy analytics object until real loaded
window.analytics || (window.analytics = []);
window.analytics.methods = ['identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', 'group', 'on', 'once', 'off'];
window.analytics.factory = function(method) {
return function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(method);
window.analytics.push(args);
return window.analytics;
};
@xerosanyam
xerosanyam / custom_game_engines_small_study.md
Created April 25, 2020 13:33 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) becaus

@xerosanyam
xerosanyam / check css
Created May 5, 2020 08:59
add this to bookmarklet & see the magic, forked
javascript: (function() {
let domStyle = document.getElementById('domStylee');
if (domStyle) {
document.body.removeChild(domStyle);
return;
}
domStyle = document.createElement("style");
domStyle.setAttribute('id', 'domStylee');
domStyle.append(
['* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }'],
@xerosanyam
xerosanyam / check css
Created May 5, 2020 08:59
add this to bookmarklet & see the magic, forked
javascript: (function() {
let domStyle = document.getElementById('domStylee');
if (domStyle) {
document.body.removeChild(domStyle);
return;
}
domStyle = document.createElement("style");
domStyle.setAttribute('id', 'domStylee');
domStyle.append(
['* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }'],