Skip to content

Instantly share code, notes, and snippets.

View HiroNakamura's full-sized avatar
🏠
Working from home

Developer of interesting things HiroNakamura

🏠
Working from home
View GitHub Profile
Edgar Rodrigues Sandi
Edgar Sandi
tw/@EdgarSandi
fb/EdgarSandi
G+/EdgarSandi
Ln/EdgarSandi
Oracle PL/SQL - 24h
Aula 1 - 17/01
ACTIVITY_LENGUAGE_CHOICE = (
('español', 'Español'),
('english', 'English'),
)
class UserProfile(models.Model):
# relations
user = models.OneToOneField(User)
@Dev-Dipesh
Dev-Dipesh / Beginner Docker Guide
Created March 27, 2015 08:01
A beginner guide to docker for looking up and setting docker image and container
DOCKER
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
@migerh
migerh / day1.erl
Created August 15, 2015 15:58
erlang
-module(day1).
-export([count/1]).
-export([count10/0]).
-export([check/1]).
count([32| Rest]) -> count(Rest) + 1;
count([_| Rest]) -> count(Rest);
count([]) -> 1.
count10(10) -> 10;
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
"path"
"strings"
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@tshm
tshm / collectinfo.bat
Last active May 26, 2022 12:26
information collection batch script
pushd c:\log
systeminfo > systeminfo.txt
msinfo32 /report msinfo32.txt
ipconfig /all > ipconfig.txt
schtasks /query /V > schtasks.txt
net use > netuse.txt
@CMCDragonkai
CMCDragonkai / typeofvar.sh
Last active May 21, 2025 03:26
Bash: Get the type of a variable
#!/usr/bin/env bash
typeofvar () {
local type_signature=$(declare -p "$1" 2>/dev/null)
if [[ "$type_signature" =~ "declare --" ]]; then
printf "string"
elif [[ "$type_signature" =~ "declare -a" ]]; then
printf "array"
@vinograd47
vinograd47 / jenkins-plugins.md
Last active April 13, 2022 07:01
My Jenkins plugins list

My Jenkins Plugins List

Must Have

  • Git Git SCM support.
  • Multiple SCMs Support for multiple SCM stages in freestyle job.
  • Copy Artifact Allows to copy artifacts between different builds and jobs.
@saeidzebardast
saeidzebardast / Enable CORS in Spark Java
Created March 8, 2016 10:30
Enable CORS in Spark Java to allow origins *
options("/*",
(request, response) -> {
String accessControlRequestHeaders = request
.headers("Access-Control-Request-Headers");
if (accessControlRequestHeaders != null) {
response.header("Access-Control-Allow-Headers",
accessControlRequestHeaders);
}