Skip to content

Instantly share code, notes, and snippets.

View danielscarvalho's full-sized avatar
:octocat:
Coding!

Daniel de Souza Carvalho danielscarvalho

:octocat:
Coding!
View GitHub Profile
@TolgaBagci
TolgaBagci / VirtualBox macOS High Sierra Codes
Created July 26, 2021 15:20
VirtualBox macOS High Sierra Codes
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "Your Virtual Machine Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
"""
A Processing implementation of Game of Life By Joan Soler-Adillon
Press SPACE BAR to pause and change the cell's values with the mouse
On pause, click to activate/deactivate cells
Press R to randomly reset the cells' grid
Press C to clear the cells' grid
The original Game of Life was created by John Conway in 1970.
"""
@kosamari
kosamari / compiler.js
Last active March 6, 2017 15:31
final compiler object for sbn compiler
var sbn = {}
sbn.VERSION = '0.0.1'
sbn.lexer = lexer
sbn.parser = parser
sbn.transformer = transformer
sbn.generator = generator
sbn.compile = function (code) {
return this.generator(this.transformer(this.parser(this.lexer(code))))
}
@darilldrems
darilldrems / pwc-pos-example-node.js
Created July 21, 2016 16:43
PwC pos printing example in javascript for Nodejs server application.
var PayWithCapture = require('PayWithCapture');
var clientId = "eyet636484u4h", //Your clientId is in your PayWithCapture DevCenter account page
clientSecret = "736484yekhgutit857485", //Your clientSecret is in your PayWithCapture DevCenter account page
env = "staging"; // env can either be staging or production
var pwcClient = new PayWithCapture(clientId, clientSecret, env);
var posClient = pwcClient.getPosPrinting();
var merchantCode = "474649"; //You merchant code is in your account page on PayWithCapture DevCenter
//this method will return transactions done by a merchant
anonymous
anonymous / joshVR.xml
Created August 22, 2015 12:41
joshVR snapshot
<scene>
<!-- Daniel -->
<group translateY="2" rotateY="-3.14">
<!-- <cube scaleX="2.75" translateY="1.0"/> -->
<!-- Each 5 spheres touchs the center one at just one pont ... just a try -->
<sphere translateX="+0.85"/> <!-- Rigth Down -->
<sphere translateX="-0.85"/> <!-- Left Down -->
@leefsmp
leefsmp / models.java
Last active February 11, 2024 19:52
Basic RESTful API from a Java servlet
package com.autodesk.adn.viewanddata;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashMap;
import java.util.UUID;
import javax.servlet.ServletException;
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active September 17, 2024 17:14
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@jboner
jboner / latency.txt
Last active September 20, 2024 23:33
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD