Skip to content

Instantly share code, notes, and snippets.

View jordanrw's full-sized avatar
🎨
Designing the future

Jordan White jordanrw

🎨
Designing the future
View GitHub Profile
@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
@haydenjameslee
haydenjameslee / convrgePublicApi.md
Last active August 29, 2015 14:24
ConVRge Public API - Online Users and Upcoming Events
@westerlund
westerlund / NSImageDisk.swift
Created November 29, 2015 10:25
Write NSImage to disk
extension NSImage {
func writeToFile(file: String, atomically: Bool, usingType type: NSBitmapImageFileType) -> Bool {
let properties = [NSImageCompressionFactor: 1.0]
guard
let imageData = TIFFRepresentation,
imageRep = NSBitmapImageRep(data: imageData),
fileData = imageRep.representationUsingType(type, properties: properties) else {
return false
}
return fileData.writeToFile(file, atomically: atomically)
@tasdikrahman
tasdikrahman / python_tests_dir_structure.md
Last active June 30, 2024 00:15
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py

@streetgt
streetgt / youtube_comment_bot.py
Last active January 15, 2022 13:04
Youtube Comment Bot - python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python bot for comment a list of urls in YouTube
import time
import numpy as np
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
@lopspower
lopspower / README.md
Last active July 5, 2024 10:20
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

# !/usr/bin/env python
# -*- coding:utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class overlay(QWidget):
def __init__(self, parent=None):
super(overlay, self).__init__(parent)
Process for setting up github pages with namecheap domain.
1. Go to namecheap.com, select and buy domain name.
2. Login to namecheap, go to username drop down and select dashboard.
3. Go to DomainList
4. Click manage button
5. Click Advanced DNS tab
6. Click add record and add three records:
Type: A Record | Host: @ | Value: 192.30.252.153 | TTL: Automatic
@zakkak
zakkak / .git-commit-template
Last active May 15, 2024 00:06 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
anonymous
anonymous / drag-and-drop.markdown
Created November 12, 2017 20:28
Drag and Drop