Skip to content

Instantly share code, notes, and snippets.

@simkimsia
simkimsia / index.php
Created June 5, 2012 15:36
for learning GET params
<?php
//Define an array of character information
$characters = array(
'yakko' => array (
'id' => 'yakkowarner',
'url' => 'characterview.php?id=yakkowarner',
'name' => 'Yakko Warner'
),
import java.util.*;
import java.io.*;
public class TestTry{
public static void main(String []args){
int a = 5;
int b = receiveNumberFromUser();
}
<VirtualHost test.localhost:80>
DocumentRoot "C:/Users/yada/Documents/GitHub/testapp/src/testapp/webroot"
ServerName test.localhost
ErrorLog "logs/testapp.local-error.log"
CustomLog "logs/testapp.local-access.log" combined
<Directory "C:/Users/yada/Documents/GitHub/testapp">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
@simkimsia
simkimsia / 0_reuse_code.js
Created November 26, 2013 12:43
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
@simkimsia
simkimsia / ubuntu-11xx-nginx-base.sh
Created May 5, 2012 01:18 — forked from predominant/ubuntu-1104-nginx-base.sh
Install Ubuntu 11.x Nginx web server w/ PHP-FPM, MySQL,CakePHP, PEAR, PHPUnit
#!/bin/bash
###
#
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com)
#
# Ubuntu 11.04 based web server installation script
# Run this by executing the following from a fresh install of Ubuntu 11.04 server:
#
@simkimsia
simkimsia / browser_history.md
Created October 24, 2020 07:55 — forked from dropmeaword/browser_history.md
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@simkimsia
simkimsia / AuthyToOtherAuthenticator.md
Created December 20, 2021 09:16 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@simkimsia
simkimsia / _base.html
Last active June 4, 2022 12:44 — forked from adamchainz/_base.html
Django HTMX CSRF setup for htmx 1.1.0 and django 3.1
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block meta_tags %}
<meta name="csrf-token" content="{{ csrf_token }}">
{% endblock %}

Universal Data Model

In business, master data management (MDM) is a method used to define and manage the critical data of an organization to provide, with data integration, a single point of reference.[1] The data that is mastered may include reference data - the set of permissible values, and the analytical data that supports decision making.[2]

In computing, a master data management tool can be used to support master data management by removing duplicates, standardizing data (mass maintaining),[3] and incorporating rules to eliminate incorrect data from entering the system in order to create an authoritative source of master data. Master data are the products, accounts and parties for which the business transactions are completed. The root cause problem stems from business unit and product line segmentation, in which the same customer will be serviced by different product lines, with redundant data being entered about the customer (a.k.a. party in the role of customer) and account in order to proc