Skip to content

Instantly share code, notes, and snippets.

View mdestafadilah's full-sized avatar
🧠
I'm an Intuiting Ekstrovert (IE) with B Blood Type.

mDestaFadilah mdestafadilah

🧠
I'm an Intuiting Ekstrovert (IE) with B Blood Type.
View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@wavezhang
wavezhang / java_download.sh
Last active April 29, 2024 14:42
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@mandiwise
mandiwise / Sync gh-pages + master branches
Last active April 27, 2024 05:41
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
@agungsugiarto
agungsugiarto / codeigniter3-cors.md
Last active April 14, 2024 15:00
Dealing with CORS in CodeIgniter 3

1. Add a config file named cors.php in the application/config directory.

<?php

defined('BASEPATH') or exit('No direct script access allowed');

$config = [
    /*
 |--------------------------------------------------------------------------
@alvr
alvr / packages.md
Last active April 14, 2024 10:51
Available Packages

Available Packages:

Path Version Description
add-ons;addon-google_apis-google-15 3 Google APIs
add-ons;addon-google_apis-google-16 4 Google APIs
add-ons;addon-google_apis-google-17 4 Google APIs
add-ons;addon-google_apis-google-18 4 Googl
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@mnem
mnem / git_fetch_pull_all_subfolders.sh
Created December 6, 2011 14:35
Simple bash script for fetching and pulling all repos in the executed folder to the latest of the branch they are on
#!/bin/bash
################
# Uncomment if you want the script to always use the scripts
# directory as the folder to look through
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPOSITORIES=`pwd`
IFS=$'\n'
@AverageMarcus
AverageMarcus / Dockerfile
Created September 2, 2021 08:49
Example multi-arch Dockerfile for Go projects
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16 as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH
WORKDIR /app/
ADD . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o yourapplication main.go
@nijikokun
nijikokun / base64-utf8.module.js
Last active February 11, 2024 23:16
Javascript Base64 UTF8 for the Browser / Server. Base64 UTF-8 Encoding and Decoding Libraries / Modules for AMD, CommonJS, Nodejs and Browsers. Cross-browser compatible.
// UTF8 Module
//
// Cleaner and modularized utf-8 encoding and decoding library for javascript.
//
// copyright: MIT
// author: Nijiko Yonskai, @nijikokun, nijikokun@gmail.com
(function (name, definition, context, dependencies) {
if (typeof context['module'] !== 'undefined' && context['module']['exports']) { if (dependencies && context['require']) { for (var i = 0; i < dependencies.length; i++) context[dependencies[i]] = context['require'](dependencies[i]); } context['module']['exports'] = definition.apply(context); }
else if (typeof context['define'] !== 'undefined' && context['define'] === 'function' && context['define']['amd']) { define(name, (dependencies || []), definition); }
else { context[name] = definition.apply(context); }
@faisalman
faisalman / Rupiah.as
Created February 26, 2011 15:35
Konversi Angka ke format Rupiah & vice versa (C#, PHP, JavaScript, ActionScript 3.0)
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license