Skip to content

Instantly share code, notes, and snippets.

View ahikmatf's full-sized avatar
💭
Learning how to code

Asep Hikmat Fatahillah ahikmatf

💭
Learning how to code
View GitHub Profile
1. Login & Select your old Account -> Profile
2. Go to My List (old profile)
3. Run this code in your Browser Developer console to Export and save My List
var tmpList = (function() {
var list = []
document.querySelectorAll('.title-card a[aria-label]').forEach(
function(item) {
try {
list.push({
@ahikmatf
ahikmatf / Cellar Ruby
Created January 9, 2020 05:33
No such file or directory @ dir_chdir - /usr/local/Cellar
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
bundle install --path vendor/bundle
// https://stackoverflow.com/a/35277239
extension UIButton {
func alignImageAndTitleVertically(padding: CGFloat = 5.0) {
let imageSize = self.imageView!.frame.size
let titleSize = self.titleLabel!.frame.size
let totalHeight = imageSize.height + titleSize.height + padding
self.imageEdgeInsets = UIEdgeInsets(
@ahikmatf
ahikmatf / download instagram profile
Created December 23, 2019 22:32
random way to download instagram picture from browser
# open https://gramsave.com/
# input the instagram username
# tap load more on the page until there is none
// not working yet wkwk
while ( document.querySelector("#load_more_img") != null) {
setTimeout(() => {
document.querySelector("#load_more_img").click()
}), 3000
}
-- Write only the SQL statement that solves the problem and nothing else.
SELECT name FROM employees
WHERE id NOT IN (SELECT managerId FROM employees
WHERE managerId IS NOT NULL);
-- Write only the SQL statement that solves the problem and nothing else.
SELECT count(firstName) FROM students WHERE firstName = "John";
<?php
class Pipeline
{
public static function make_pipeline(...$funcs)
{
return function($arg) use ($funcs)
{
$temporaryResult = $arg;
foreach ($funcs as $func) {
$temporaryResult = $func($temporaryResult);
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$splittedWord = str_split(strtolower($word));
$reversedSWord = array_reverse($splittedWord);
$reversedWord = implode("", $reversedSWord);
return strtolower($word) == $reversedWord;
}
@ahikmatf
ahikmatf / Where you find.html
Created March 29, 2019 01:49
Where you get info: TIA Stores (Checkout)
<select class="owner-field-select tickera-input-field" name="owner_data_tc_ff_wheredidyouhearabouttiajakartaconference_tcfn_2227_post_meta[19431][0]">
<option value="" selected=""></option>
<option value="I was a past attendee">I was a past attendee </option>
<option value="Tech in Asia emails">Tech in Asia emails </option>
<option value="Social media (Facebook/Instagram/LinkedIn/Twitter)">Social media (Facebook/Instagram/LinkedIn/Twitter) </option>
<option value="Tech in Asia website">Tech in Asia website </option>
<option value="Friends">Friends </option>
<option value="Web Search">Web Search </option>
</select>