Skip to content
View lvnam96's full-sized avatar
🐧
why are we still here? just to suffer?
🐧
why are we still here? just to suffer?

Block or report lvnam96

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Responsive embedding of Google Maps ... Responsive embedding of Google Maps (or anything <iframe> embedded really).
    1
    # Responsive Google Maps embedding
    2
    Simple technique for embedding Google Maps `<iframe>`'s responsively using a `padding-bottom` percentage trick, which when applied to a block element will be calculated as a percentage of the _element width_ - essentially providing an aspect ratio.
    3
    
                  
    4
    This technique should work on anything that is `<iframe>` embedded from your social network/service of choice.
  2. Aliasing Git commands Aliasing Git commands
    1
    git config --global alias.st status
    2
    git config --global alias.br branch
    3
    git config --global alias.co checkout
    4
    git config --global alias.ls 'log --oneline --decorate'
    5
    git config --global alias.sts stash
  3. Verify GibHub account on Keybase.io Verify GibHub account on Keybase.io
    1
    ### Keybase proof
    2
    
                  
    3
    I hereby claim:
    4
    
                  
    5
      * I am lvnam96 on github.
  4. Generate random dark HSL color (CSS)... Generate random dark HSL color (CSS) in JavaScript
    1
    const getRandomColor = () => {
    2
        const h = Math.floor(Math.random() * 360),
    3
              s = Math.floor(Math.random() * 100) + '%',
    4
              l = Math.floor(Math.random() * 60) + '%';// max value of l is 100, but I set to 60 cause I want to generate dark colors
    5
                                                       // (use for background with white/light font color)
  5. promises-in-sequence-and-parallel.js promises-in-sequence-and-parallel.js
    1
    function workAfterDataRetrieved (data) {
    2
      return new Promise((resolve) => {
    3
        // doSomeDutyTaskHere();
    4
        console.log('task done: ' + data.name);
    5
        resolve();
  6. Generate random string/characters in... Generate random string/characters in JavaScript (from Stack Overflow)
    1
    //https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript
    2
    (length => {
    3
        let text = '';
    4
        const POSSIBLE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
    5
            POSSIBLE_SCOPE = POSSIBLE_CHARS.length;