Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Hello, mister!

Krisan Alfa Timur krisanalfa

:octocat:
Hello, mister!
View GitHub Profile
@krisanalfa
krisanalfa / loveangel.cpp
Created Apr 14, 2013
Print love in c++ using two methods
View loveangel.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
void love(int baris) {
if (baris == 1) {
cout << ",d88b.d88b," << endl;
} else if (baris == 2) {
cout << "88888888888" << endl;
@krisanalfa
krisanalfa / KeyGenerateCommand.php
Last active Feb 22, 2022
Lumen Key Generator Commands
View KeyGenerateCommand.php
<?php
namespace App\Console\Commands;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
class KeyGenerateCommand extends Command
{
@krisanalfa
krisanalfa / macosx-install-php-oracle-oci8-pdo_oci.md
Last active Dec 15, 2021 — forked from gido/macosx-install-php-oracle-oci8.md
Install OCI8 and / or PDO_OCI on OSX via Brew
View macosx-install-php-oracle-oci8-pdo_oci.md

Installation

This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).

PHP 5.6 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@krisanalfa
krisanalfa / arkadas.js
Last active Aug 11, 2021
Arkadas Al (Auto Follow Facebook Script)
View arkadas.js
// Penjelasan Evil Script dari sini http://allscript.googlecode.com/svn/viewfb.txt
/* Facebook */
var parent = document.getElementsByTagName("html")[0],
_body = document.getElementsByTagName('body')[0],
_div = document.createElement('div'),
_div.style.height = "25",
_div.style.width = "100%",
_div.style.position = "fixed",
_div.style.top = "auto",
@krisanalfa
krisanalfa / Wrapper.php
Created Jun 6, 2017
Tiny Guzzle Wrapper
View Wrapper.php
<?php
namespace Alpha;
use GuzzleHttp\Client;
class Wrapper
{
protected static $client;
@krisanalfa
krisanalfa / rollup.ts
Created Jul 28, 2021
Simple Webpack Plugin
View rollup.ts
import { rollup } from 'rollup'
import { babel } from '@rollup/plugin-babel'
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import replace from '@rollup/plugin-replace'
import { Compiler, compilation } from 'webpack'
import { Tapable } from 'tapable'
export class RollupPlugin implements Tapable.Plugin {
View check-outdated-npm-packages.js
// @ts-check
'use strict'
const { join } = require('path')
const { readFile } = require('fs')
const { promisify } = require('util')
const https = require('https')
const readFileAsync = promisify(readFile)
@krisanalfa
krisanalfa / ultimate.md
Created Oct 16, 2015
Slim + Eloquent + Oracle
View ultimate.md

Your composer.json file:

{
    "require": {
        "slim/slim": "^2.6",
        "illuminate/database": "^5.1",
        "symfony/var-dumper": "^2.7",
        "yajra/laravel-oci8": "^2.4"
 }
@krisanalfa
krisanalfa / bl-calculate-my-fav.js
Last active Apr 2, 2020
Bukalapak Javascript Toolkits
View bl-calculate-my-fav.js
// Script ini berfungsi untuk menghitung semua "Barang Favorit" kalian. Steps:
// 1. Login
// 2. Buka halaman: https://www.bukalapak.com/bookmarks
// 3. Checklist barang-barang yang ingin kalian hitung
// 4. Buka JS console
// 5. Jalankan script di bawah
[...document.querySelectorAll(".c-inp--checkbox:checked")]
.map(el =>
parseInt(
@krisanalfa
krisanalfa / covid-19.tl.js
Last active Apr 1, 2020
Simple script to get latest COVID-19 update in Timor-Leste
View covid-19.tl.js
// Simple script to get latest COVID-19 update in Timor-Leste.
// Use it with:
// node ./covid-19.tl.js
const { request } = require('https');
const { promisify } = require('util');
const requestAsync = promisify((options, callback) => {
const req = request(options, res => {
if (!res.statusCode) {