Skip to content

Instantly share code, notes, and snippets.

View nguyenlamlll's full-sized avatar
🚀
Working!

Lam Le nguyenlamlll

🚀
Working!
View GitHub Profile
@hakre
hakre / dl-file.php
Created January 2, 2012 21:41
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@MihailJP
MihailJP / d_copy.lua
Created October 22, 2012 14:47
Shallow- and deep-copy of table in Lua
function clone (t) -- deep-copy a table
if type(t) ~= "table" then return t end
local meta = getmetatable(t)
local target = {}
for k, v in pairs(t) do
if type(v) == "table" then
target[k] = clone(v)
else
target[k] = v
end
@digitaljhelms
digitaljhelms / gist:4287848
Last active June 3, 2025 10:10
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@hubgit
hubgit / README.md
Last active May 12, 2025 09:45
A5 printed card with HTML + CSS
  1. Clone this Gist.
  2. For card sizes other than A5, edit the size value in @page, and the height and width properties of body.
  3. Add contents to each face. The simplest approach is to add an image called front.png of the same dimensions as the card.
  4. Generate a PDF from the HTML + CSS. If using Prince, it's as simple as prince index.html card.pdf.
  5. Take the PDF to a printer, and ask them to print as many copies as you need.
@w25r
w25r / .gitignore
Last active August 7, 2022 19:42
Basic .gitignore for gradle, including Eclipse and Intellij settings
#Gradle
.gradle/
build/
# Eclipse
.classpath
.project
.settings/
bin/
@jdarling
jdarling / data.json
Last active March 24, 2025 21:35
D3 MindMap
{
"name": "Root",
"children": [
{
"name": "Branch 1",
"children": [
{"name": "Leaf 3"},
{"name": "Leaf 4"}
]
},
@jpluimers
jpluimers / get-msbuildExe-path.bat
Last active March 2, 2019 22:26
Get the path to the most recent msbuild.exe from the registry.
@echo off
:: http://stackoverflow.com/questions/328017/path-to-msbuild
:: http://www.csharp411.com/where-to-find-msbuild-exe/
:: http://timrayburn.net/blog/visual-studio-2013-and-msbuild/
:: http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx
setlocal
:vswhereModernTry
:: https://github.com/Microsoft/vswhere/wiki/Find-MSBuild
:: Normal output example of `vswhere -legacy -latest -property installationPath` has no trailing back-slash:
@wmandai
wmandai / Codeigniter IIS web.config
Last active August 11, 2023 06:24
IIS web.config for codeigniter
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Index">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@iamfaisal
iamfaisal / Web.config
Created August 9, 2015 11:38
Web.config for Codeigniter 3.0
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
@cpietsch
cpietsch / README.md
Last active May 22, 2025 12:36
d3.js map with markers

Easy example on how to put marker on a d3.js map.

You got 2 options:

  • using d3.geo.path() which does all the work for you
  • using svg circles and translating them via projection(d.geometry.coordinates)