Skip to content

Instantly share code, notes, and snippets.

View oguzkaganeren's full-sized avatar
👊

Oğuz Kağan EREN oguzkaganeren

👊
View GitHub Profile
@tlylt
tlylt / add-all-contributors.py
Created January 10, 2022 15:57
Automatically add all existing GitHub repo contributors with all-contributors-cli
import subprocess
import shlex
import sys
def init():
print("Initialize all-contributors")
subprocess.run(shlex.split("npx all-contributors-cli init"), shell=True)
@jmn
jmn / .js
Created November 22, 2018 17:43
React Native Apollo FlatList infinite scroll
import React from 'react';
import { Text, View, SafeAreaView, FlatList, WebView, Dimensions, Button, ScrollView} from 'react-native';
import { ListItem } from 'react-native-elements';
import ApolloClient from "apollo-boost";
import gql from "graphql-tag";
import { ApolloProvider } from "react-apollo";
import { Query } from "react-apollo";
import HTML from 'react-native-render-html';
import { createAppContainer, createStackNavigator} from 'react-navigation';
@mauri870
mauri870 / manjaro-avell-g1513.md
Last active March 2, 2022 02:23
Installation of Manjaro 17 and nvidia/bumblebee drivers on Avell G1513

After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop

Here's my notebook specs:

$ inxi -MGCNA

Machine:   Device: laptop System: Avell High Performance product: 1513
           Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery    BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
@satreix
satreix / custom_archlinux_live_USB.md
Last active July 28, 2024 20:02
Custom Arch Linux live USB

Custom Arch Linux live USB

Setup

Install the dependencies for the archiso package:

(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git

I recommend archiso getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below. So, grab the most recent version from git and install it:

(user): git clone git://projects.archlinux.org/archiso.git && cd archiso

@montanaflynn
montanaflynn / check_for_dependencies.sh
Last active July 15, 2024 11:41
Checking for dependencies in a shell script
# Easy way to check for dependencies
checkfor () {
command -v $1 >/dev/null 2>&1 || {
echo >&2 "$1 required";
exit 1;
}
}
checkfor "ffmpeg"
@companje
companje / socket.io-stream-server-to-browser.js
Created September 9, 2014 13:55
socket.io-stream from NodeJS Server to Browser
/////////////////////////////
// NodeJS Server
/////////////////////////////
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var ss = require('socket.io-stream');
var path = require('path');
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...