Skip to content

Instantly share code, notes, and snippets.

View jdbruxelles's full-sized avatar
😎
Yep, I'm fine

José dBruxelles jdbruxelles

😎
Yep, I'm fine
View GitHub Profile
@jdbruxelles
jdbruxelles / unlipage.js
Last active April 10, 2017 12:35
Pagination
function loophalaman(a){var b="";nomerkiri=parseInt(numshowpage/2),nomerkiri==numshowpage-nomerkiri&&(numshowpage=2*nomerkiri+1),mulai=nomerhal-nomerkiri,mulai<1&&(mulai=1),maksimal=parseInt(a/postperpage)+1,maksimal-1==a/postperpage&&(maksimal-=1),akhir=mulai+numshowpage-1,akhir>maksimal&&(akhir=maksimal),b+="";var c=parseInt(nomerhal)-1;nomerhal>1&&(b+=2==nomerhal?"page"==jenis?'<li class="showpage"><a href="'+home_page+'">'+upPageWord+"</a></li>":'<li class="showpageNum"><a href="/search/label/'+lblname1+"?&max-results="+postperpage+'">'+upPageWord+"</a></li>":"page"==jenis?'<li class="showpageNum"><a href="#" onclick="redirectpage('+c+');return false">'+upPageWord+"</a></li>":'<li class="showpageNum"><a href="#" onclick="redirectlabel('+c+');return false">'+upPageWord+"</a></li>"),mulai>1&&(b+="page"==jenis?'<li class="showpageNum"><a href="'+home_page+'">1</a></li>':'<li class="showpageNum"><a href="/search/label/'+lblname1+"?&max-results="+postperpage+'">1</a></li>'),mulai>2&&(b+="");for(var d=mulai;d<=
@jdbruxelles
jdbruxelles / gitBash_windows.md
Created August 4, 2022 23:56 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@jdbruxelles
jdbruxelles / Github Webhook Tutorial.md
Created August 25, 2022 11:36 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings