Skip to content

Instantly share code, notes, and snippets.

😜
Trying to know why...

Parsa Ghadimi qti3e

😜
Trying to know why...
Block or report user

Report or block qti3e

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rodyhaddad
rodyhaddad / timeago.filter.js
Created Jun 30, 2013
timeago filter for angularjs
View timeago.filter.js
.filter("timeago", function () {
//time: the time
//local: compared to what time? default: now
//raw: wheter you want in a format of "5 minutes ago", or "5 minutes"
return function (time, local, raw) {
if (!time) return "never";
if (!local) {
(local = Date.now())
}
View orig.js
import { grad, linspace, plot } from "propel";
f = x => x.tanh();
x = linspace(-4, 4, 200);
plot(x, f(x),
x, grad(f)(x),
x, grad(grad(f))(x),
x, grad(grad(grad(f)))(x),
x, grad(grad(grad(grad(f))))(x))
View fix_macintosh_portrange.sh
#sudo sysctl -w net.inet.ip.portrange.first=32768
sudo sysctl -w net.inet.ip.portrange.first=12000
sudo sysctl -w net.inet.tcp.msl=1000
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000
@SimonMarquis
SimonMarquis / PreventScreenshot.java
Created Oct 21, 2016
Prevent screenshot on Activity, Dialog, Surface, etc.
View PreventScreenshot.java
import android.app.Activity;
import android.app.Dialog;
import android.app.Fragment;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
/**
@qti3e
qti3e / README.md
Last active Jun 19, 2019
List of file signatures and mime types based on file extensions
View README.md
@mika76
mika76 / dataview-polyfill.js
Created Sep 26, 2015
DataView (and ArrayBuffer) polyfill that works in any engine (including old IE).
View dataview-polyfill.js
void function(global){
if ('DataView' in global && 'ArrayBuffer' in global) {
return;
}
var hide = (function(){
// check if we're in ES5
if (typeof Object.getOwnPropertyNames === 'function' && !('prototype' in Object.getOwnPropertyNames)) {
var hidden = { enumerable: false };
@awjuliani
awjuliani / Q-Net Learning Clean.ipynb
Created Aug 25, 2016
Basic Q-Learning algorithm using Tensorflow
View Q-Net Learning Clean.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@filewalkwithme
filewalkwithme / main.go
Last active Oct 12, 2019
Listening multiple ports on golang http servers (using http.Handler)
View main.go
package main
import (
"net/http"
)
func main() {
go func() {
http.ListenAndServe(":8001", &fooHandler{})
}()
@kevinSuttle
kevinSuttle / meta-tags.md
Last active Oct 13, 2019 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@nkbt
nkbt / .eslintrc.js
Last active Oct 13, 2019
Strict ESLint config for React, ES6 (based on Airbnb Code style)
View .eslintrc.js
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
You can’t perform that action at this time.