Skip to content

Instantly share code, notes, and snippets.

View ydhnwb's full-sized avatar
🎯
Focusing

Prieyuda Akadita S. ydhnwb

🎯
Focusing
  • 02:37 (UTC +07:00)
View GitHub Profile
@Bobmajor
Bobmajor / gist:319e89e9c876cccdb1b77f1783e9a820
Created April 25, 2020 16:06
HOW TO INSTALL POSTMAN ON LINUX WITHOUT SNAP
1. Go to the Postman app download page at https://www.getpostman.com/apps. You can choose the os version from the drop-down. x64 for 64 bit Operating System and x84 for the 32 bit based Linux
2. Open the terminal and go to the directory where you have downloaded the tar file. If you have downloaded on the Downloads folder
cd ~/Downloads/
3. Run the following commands,
sudo rm -rf /opt/Postman/
@roipeker
roipeker / image_color_picker_widget.dart
Last active August 27, 2024 07:51
Basic image pixel color detection in Flutter (supports screenshots of the widget tree)
//////////////////////////////
//
// 2019, roipeker.com
// screencast - demo simple image:
// https://youtu.be/EJyRH4_pY8I
//
// screencast - demo snapshot:
// https://youtu.be/-LxPcL7T61E
//
//////////////////////////////
@jtbonhomme
jtbonhomme / hasMany.go
Created May 22, 2018 11:11
Gorm example of foreign key definition for a hasMany relation
package main
import (
"fmt"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres"
)
// Customer ...
type Customer struct {
@piyush-malaviya
piyush-malaviya / FileUploadService.java
Created February 2, 2018 06:03
Example for uploading file using foreground service
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.os.Handler;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.text.TextUtils;
@cuteribs-1
cuteribs-1 / pci-table.md
Last active February 13, 2023 14:17
PCI Vendor Data Table
Vendor Id Vendor Name
0x0033 Paradyne Corp.
0x003D master
0x0070 Hauppauge Computer Works Inc.
0x0100 USBPDO-8
0x0123 General Dynamics
0x0315 SK - Electronics Co., Ltd.
0x0402 Acer aspire one
0x046D Logitech Inc.
@turbo
turbo / std.md
Last active September 6, 2024 19:46
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
@agusmakmun
agusmakmun / serializer.py
Last active July 22, 2024 19:25
Sample Upload image with Django Rest Framework.
from rest_framework import serializers
from evotee.models import Candidate
class CandidateSerializer(serializers.ModelSerializer):
selection = serializers.CharField(
source='selection.code',
read_only=True
)
photo = serializers.ImageField(
@davidbradway
davidbradway / LeapMotionPushoverShare.py
Created October 30, 2015 01:42
Python program to detect Leap Motion 'Screen Tap' events and pass them as messages via the Pushover web service.
#! python
################################################################################
# Copyright (C) 2012-2013 Leap Motion, Inc. All rights reserved. #
# Leap Motion proprietary and confidential. Not for distribution. #
# Use subject to the terms of the Leap Motion SDK Agreement available at #
# https://developer.leapmotion.com/sdk_agreement, or another agreement #
# between Leap Motion and you, your company or other organization. #
################################################################################